2012 12-08-travis-ci-could-do
TRANSCRIPT
10 Things You Didn’t Know Travis-CI Could Do
2012-12-08 RejectTokyoRubyKaigi10Murahashi “Sanemat” Kenichi
10 Things You Didn’t Know Travis-CI Could Do
2012-12-08 RejectTokyoRubyKaigi10Murahashi “Sanemat” Kenichi
35
10 Things You Didn’t Know Travis-CI Could Do
2012-12-08 RejectTokyoRubyKaigi10Murahashi “Sanemat” Kenichi
JEG2
35
#1 Play Nethack
http://www.spyderbytedesign.com/sites/default/files/images/20123105093356.png
#1 Play Nethacklanguage: rubyrvm: 1.9.3before_script: - sudo apt-get install nethack-consolescript: - PATH=$PATH:/usr/games nethack
#1 Play Nethacklanguage: rubyrvm: 1.9.3before_script: - sudo apt-get install nethack-consolescript: - PATH=$PATH:/usr/games nethack
#1 Play Nethacklanguage: rubyrvm: 1.9.3 before_script: - sudo apt-get install nethack-console script: - PATH=$PATH:/usr/games nethack
NetHack, Copyright 1985-2003 By Stichting Mathematisch Centrum and M. Stephenson. See license for details.
Shall I pick a character's race, role, gender and alignment for you? [ynq]
#1 Play Nethacklanguage: rubyrvm: 1.9.3 before_script: - sudo apt-get install nethack-console script: - PATH=$PATH:/usr/games nethack
NetHack, Copyright 1985-2003 By Stichting Mathematisch Centrum and M. Stephenson. See license for details.
Shall I pick a character's race, role, gender and alignment for you? [ynq] Timeout
#2 Play Nethack!language: rubyrvm: 1.9.3before_script: - sudo apt-get install nethack-consolescript: - yes y | PATH=$PATH:/usr/games nethack
#2 Play Nethack!
NetHack (gettty): Invalid argumententust play from a terminal.
#3 Play Minecraftlanguage: javabefore_script: wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jarscript: java -cp minecraft.jar net.minecraft.LauncherFrame
#3 Play Minecraft
Executing your script (java -cp minecraft.jar net.minecraft.LauncherFrame) took longer than 30 minutes and was terminated. Timeout
#4 Build Timeouts
• http://about.travis-ci.org/docs/user/build-configuration/#Build-Timeouts“Exact timeout values vary between project types but in general are between 10 and 15 minutes for test suite runs and between 5 and 10 minutes for before scripts and so on.
Inspire from JEG2
• Ten Things You Didn't Know Rails Could Do
• Ten Things You Didn't Know Ruby Could Do
JEG2
#0 Who am I
name: Murahashi Sanemat Kenichienv:- COMPANY=zynga DOMAIN=game PRODUCT=cityville, words with friends- COMPANY=mr taddy DOMAIN=e-commerce PRODUCT=oh my glasses
#0 Tracks
#1 Play Nethack, #2 Play Nethack!, #3 Play Minecraft, #4 Build Timeouts, #5 BUG: Detect wrong commit, #6 Sous Chef, #7 32bit Ubuntu, #8 All in One, #9 Quick
Feedback, #10 Freenode, #11 Mailing List, #12 Role Model: qa@it, #13 Role Models: soryu, #14 Only MAJOR MINOR TEENY, #15 Bundler Version, #16 For
Capybara, #17 Reduce Call Rake, #18 RAILS_ENV, #19 rake spec vs rspec, #20 rake spec options, #21 rake cucumber options, #22 rspec Format Document, #23 rake
COMMAND --trace, #24 Current My Best, #25 bundler_args, --without, #26 capistrano/bundler, #27 Gemfile Group, #28 Remove Unnecessary Gems, #29 Not therubyracer, But nodejs, #30 Use :ci Group?, #31 Actual Each Tests, #32 Use Travis-pro (era of closed beta), #33 Use Travis-pro public beta, #34 Travis-Pro price?, #35
Updating is worthful
#0 We are Hiring!
@jugyoSeptember, 2012 ~ November, 2012
#0 Tracks
#1 Play Nethack, #2 Play Nethack!, #3 Play Minecraft, #4 Build Timeouts, #5 BUG: Detect wrong commit, #6 Sous Chef, #7 32bit Ubuntu, #8 All in One, #9 Quick
Feedback, #10 Freenode, #11 Mailing List, #12 Role Model: qa@it, #13 Role Models: soryu, #14 Only MAJOR MINOR TEENY, #15 Bundler Version, #16 For
Capybara, #17 Reduce Call Rake, #18 RAILS_ENV, #19 rake spec vs rspec, #20 rake spec options, #21 rake cucumber options, #22 rspec Format Document, #23 rake
COMMAND --trace, #24 Current My Best, #25 bundler_args, --without, #26 capistrano/bundler, #27 Gemfile Group, #28 Remove Unnecessary Gems, #29 Not therubyracer, But nodejs, #30 Use :ci Group?, #31 Actual Each Tests, #32 Use Travis-pro (era of closed beta), #33 Use Travis-pro public beta, #34 Travis-Pro price?, #35
Updating is worthful
#5 BUG: Detect wrong commit
• Travis-CI detects wrong trigger? Github send wrong hook? - Stack Overflow
• Two problems:
• Wrong detect as master commit, and sometimes fail
• Wrong detect spend actual build time
#5 BUG: Detect wrong commit
• Travis-CI detects wrong trigger? Github send wrong hook? - Stack Overflow
• Two problems:
• Wrong detect as master commit, and sometimes fail
• Wrong detect spend actual build time
#6 Sous Chef
• Sous Chef (michaelklishin/sous-chef)
• Build your own travis sandbox
• $ gem install vagrant --version ">= 1.0"$ hub clone michaelklishin/sous-chef$ cd sous-chef$ cp Vagrantfile.sample Vagrantfile$ vagrant up
#6 Sous Chef
• Sous Chef (michaelklishin/sous-chef)
• Build your own travis sandbox
• $ gem install vagrant --version ">= 1.0"$ hub clone michaelklishin/sous-chef$ cd sous-chef$ cp Vagrantfile.sample Vagrantfile$ vagrant up
#7 32bit Ubuntu
• “oneiric32_base”
• Ubuntu 11.10, 32bit
• https://github.com/michaelklishin/sous-chef/blob/master/Vagrantfile.sample
#7 32bit Ubuntu
• “oneiric32_base”
• Ubuntu 11.10, 32bit
• https://github.com/michaelklishin/sous-chef/blob/master/Vagrantfile.sample
Sad
#8 All in One
• https://github.com/travis-ci/travis-cookbooks/ci_environment
#8 All in One
• https://github.com/travis-ci/travis-cookbooks/ci_environment
• ant, apt, bazaar, bison, build-essential, cassandra, chromium, clang, cmake, composer, couchdb, doxygen, elasticsearch, emacs, erlang, firefox, git, golang, gradle, gvm, haskell, hbase, htop, imagemagick, iptables, java, kerl, kestrel, leiningen, libffi, libgdbm, libncurses, libossp-uuid, libqt4, libreadline, libssl, libxml, libyaml, lighttpd, maven3, memcached, mercurial, mingw32, mongodb, mysql, neo4j-server, networking_basic, nodejs, openssh, openssl, perlbrew, phantomjs, php, phpbuild, phpenv, postgresql, pypy, python, rabbitmq, ragel, ramfs, rebar, redis, riak, rvm, sbt, scons, sphinx, sqlite, subversion, sweeper, sysctl, timezone, travis_build_environment, unarchivers, util-linux, vim, xserver, zeromq, zookeeper
#9 Quick Feedback
#9 Quick Feedback
Only Travis-pro
#10 Freenode• irc.freenode.net#travis
#10 Freenode• irc.freenode.net#travis
People are gathered, only when the error came out incomprehensible.
#11 Mailing List• http://groups.google.com/group/travis-ci
#0 Tracks
#1 Play Nethack, #2 Play Nethack!, #3 Play Minecraft, #4 Build Timeouts, #5 BUG: Detect wrong commit, #6 Sous Chef, #7 32bit Ubuntu, #8 All in One, #9 Quick
Feedback, #10 Freenode, #11 Mailing List, #12 Role Model: qa@it, #13 Role Models: soryu, #14 Only MAJOR MINOR TEENY, #15 Bundler Version, #16 For
Capybara, #17 Reduce Call Rake, #18 RAILS_ENV, #19 rake spec vs rspec, #20 rake spec options, #21 rake cucumber options, #22 rspec Format Document, #23 rake
COMMAND --trace, #24 Current My Best, #25 bundler_args, --without, #26 capistrano/bundler, #27 Gemfile Group, #28 Remove Unnecessary Gems, #29 Not therubyracer, But nodejs, #30 Use :ci Group?, #31 Actual Each Tests, #32 Use Travis-pro (era of closed beta), #33 Use Travis-pro public beta, #34 Travis-Pro price?, #35
Updating is worthful
#12 Role Model: qa@it
Travis CIでサーバ側のブラウザはどう設定すれば良い? - QA@ITlanguage: rubyrvm: 1.9.3bundler_args: --without development:productionbefore_install: gem update bundlerbefore_script: - RAILS_ENV=test rake db:create db:test:load --quiet - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start
#12 Role Model: qa@it
Travis CIでサーバ側のブラウザはどう設定すれば良い? - QA@ITlanguage: rubyrvm: 1.9.3bundler_args: --without development:productionbefore_install: gem update bundlerbefore_script: - RAILS_ENV=test rake db:create db:test:load --quiet - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start
8 lines
#13 Role Models: soryu
Gather .travis.yml sanemat/soryu
#13 Role Models: soryu
Gather .travis.yml sanemat/soryuSourceORYU
#13 Role Models: soryu
Gather .travis.yml sanemat/soryuSourceORYU
PleasePull Request
#0 Tracks
#1 Play Nethack, #2 Play Nethack!, #3 Play Minecraft, #4 Build Timeouts, #5 BUG: Detect wrong commit, #6 Sous Chef, #7 32bit Ubuntu, #8 All in One, #9 Quick
Feedback, #10 Freenode, #11 Mailing List, #12 Role Model: qa@it, #13 Role Models: soryu, #14 Only MAJOR MINOR TEENY, #15 Bundler Version, #16 For
Capybara, #17 Reduce Call Rake, #18 RAILS_ENV, #19 rake spec vs rspec, #20 rake spec options, #21 rake cucumber options, #22 rspec Format Document, #23 rake
COMMAND --trace, #24 Current My Best, #25 bundler_args, --without, #26 capistrano/bundler, #27 Gemfile Group, #28 Remove Unnecessary Gems, #29 Not therubyracer, But nodejs, #30 Use :ci Group?, #31 Actual Each Tests, #32 Use Travis-pro (era of closed beta), #33 Use Travis-pro public beta, #34 Travis-Pro price?, #35
Updating is worthful
#14 Only MAJOR MINOR TEENY
rvm: - 1.9.3
#14 Only MAJOR MINOR TEENY
rvm: - 1.9.3 Do not specify
patch level like 1.9.3-p327
#15 Bundler Version
before_install: - gem update bundler
#15 Bundler Version
before_install: - gem update bundler
bundle --version #=> 1.1bundle --version #=> 1.2
#16 For Capybara
before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start
#16 For Capybara
before_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start
#17 Reduce Call Rakebefore_script: - rake db:create - rake db:migratescript: - rake spec
before_script: - rake db:create db:migratescript: - rake spec
#17 Reduce Call Rakebefore_script: - rake db:create - rake db:migratescript: - rake spec
before_script: - rake db:create db:migratescript: - rake spec
#18 RAILS_ENV
- rake db:create
- RAILS_ENV=test rake db:create
#18 RAILS_ENV
- rake db:create
- RAILS_ENV=test rake db:create
development, test
test
#19 rake spec vs rspec
$ rake spec
$ rspec
#19 rake spec vs rspec
$ rake spec
$ rspec
purge, migrate, test
only test
#20 rake spec options
$ rake spec SPEC=path/to/file SPEC_OPT=’-fd’
$ rspec -fd path/to/file
#20 rake spec options
$ rake spec SPEC=path/to/file SPEC_OPT=’-fd’
$ rspec -fd path/to/file
SPEC, SPEC_OPT
#21 rake cucumber options
$ rake cucumber FEATURE=path/to/file
$ cucumber path/to/file
#21 rake cucumber options
$ rake cucumber FEATURE=path/to/file
$ cucumber path/to/file
FEATURE
#22 rspec Format Document
$ rspec -fd --color
#22 rspec Format Document
$ rspec -fd --color
#23 rake COMMAND --trace
$ rake db:migrate --trace
#23 rake COMMAND --trace
$ rake db:migrate --trace
#24 Current My Best
before_script: - RAILS_ENV=test bundle exec rake db:create db:schema:loadscript:- bundle exec rspec -fd
#24 Current My Best
before_script: - RAILS_ENV=test bundle exec rake db:create db:schema:loadscript:- bundle exec rspec -fd
#0 Tracks
#1 Play Nethack, #2 Play Nethack!, #3 Play Minecraft, #4 Build Timeouts, #5 BUG: Detect wrong commit, #6 Sous Chef, #7 32bit Ubuntu, #8 All in One, #9 Quick
Feedback, #10 Freenode, #11 Mailing List, #12 Role Model: qa@it, #13 Role Models: soryu, #14 Only MAJOR MINOR TEENY, #15 Bundler Version, #16 For
Capybara, #17 Reduce Call Rake, #18 RAILS_ENV, #19 rake spec vs rspec, #20 rake spec options, #21 rake cucumber options, #22 rspec Format Document, #23 rake
COMMAND --trace, #24 Current My Best, #25 bundler_args, --without, #26 capistrano/bundler, #27 Gemfile Group, #28 Remove Unnecessary Gems, #29 Not therubyracer, But nodejs, #30 Use :ci Group?, #31 Actual Each Tests, #32 Use Travis-pro (era of closed beta), #33 Use Travis-pro public beta, #34 Travis-Pro price?, #35
Updating is worthful
#25 bundler_args, --without
bundler_args: --deployment --without development production
#25 bundler_args, --without
bundler_args: --deployment --without development production
#26 capistrano/bundler
https://github.com/carlhuda/bundler/blob/master/lib/bundler/deployment.rb
#26 capistrano/bundler
https://github.com/carlhuda/bundler/blob/master/lib/bundler/deployment.rb
#27 Gemfile Group
Gemfile
#27 Gemfile Group
Gemfile
Gemfileのgroup
で:production,
:development, :test 以外は気をつけて使う « 實松アウトプット
#28 Remove Unnecessary Gems
Remove debugger, therubyracer(libv8)from Travis-CI Environment
#28 Remove Unnecessary Gems
Remove debugger, therubyracer(libv8)from Travis-CI Environment
Travis-ci環境からdebuggerは外しておけ « 實松アウト
プット
#29 Not therubyracer, But nodejs
x therubyracero nodejs
#29 Not therubyracer, But nodejs
x therubyracero nodejs Travis-CI has Node.js
#30 Use :ci Group?Use debugger, pry-rails in test environment, but these are unnecessary in travis environment
group :ci
#30 Use :ci Group?Use debugger, pry-rails in test environment, but these are unnecessary in travis environment
group :ci
bundler-args:- without development production test
capistrano:set, :without: [:development, :test, :ci]
#31 Actual Each Tests
Small toy app depends on spin-up time, but actual mostly spends each tests.
#31 Actual Each Tests
Small toy app depends on spin-up time, but actual mostly spends each tests.
database cleaner, fixture, fixture replacement, mock, stub, ...
#0 Tracks
#1 Play Nethack, #2 Play Nethack!, #3 Play Minecraft, #4 Build Timeouts, #5 BUG: Detect wrong commit, #6 Sous Chef, #7 32bit Ubuntu, #8 All in One, #9 Quick
Feedback, #10 Freenode, #11 Mailing List, #12 Role Model: qa@it, #13 Role Models: soryu, #14 Only MAJOR MINOR TEENY, #15 Bundler Version, #16 For
Capybara, #17 Reduce Call Rake, #18 RAILS_ENV, #19 rake spec vs rspec, #20 rake spec options, #21 rake cucumber options, #22 rspec Format Document, #23 rake
COMMAND --trace, #24 Current My Best, #25 bundler_args, --without, #26 capistrano/bundler, #27 Gemfile Group, #28 Remove Unnecessary Gems, #29 Not therubyracer, But nodejs, #30 Use :ci Group?, #31 Actual Each Tests, #32 Use Travis-pro (era of closed beta), #33 Use Travis-pro public beta, #34 Travis-Pro price?, #35
Updating is worthful
#32 Use Travis-pro (era of closed beta)
Travis CI: The Travis Plans
#33 Use Travis-pro public beta
Travis CI: Shipping the new Travis CI web UI for Travis
Pro
#33 Use Travis-pro public beta
Travis CI: Shipping the new Travis CI web UI for Travis
Pro December 27, 2012
#34 Travis-Pro price?
Travis CI: The Travis Plans
#34 Travis-Pro price?
Travis CI: The Travis Plans
small plan is $129 per month, and our big
plan is $249 per month
#35 Updating is worthful
Automatical update causes pain Temporarily, but this bring happy, I think.
#0 Tracks
#1 Play Nethack, #2 Play Nethack!, #3 Play Minecraft, #4 Build Timeouts, #5 BUG: Detect wrong commit, #6 Sous Chef, #7 32bit Ubuntu, #8 All in One, #9 Quick
Feedback, #10 Freenode, #11 Mailing List, #12 Role Model: qa@it, #13 Role Models: soryu, #14 Only MAJOR MINOR TEENY, #15 Bundler Version, #16 For
Capybara, #17 Reduce Call Rake, #18 RAILS_ENV, #19 rake spec vs rspec, #20 rake spec options, #21 rake cucumber options, #22 rspec Format Document, #23 rake
COMMAND --trace, #24 Current My Best, #25 bundler_args, --without, #26 capistrano/bundler, #27 Gemfile Group, #28 Remove Unnecessary Gems, #29 Not therubyracer, But nodejs, #30 Use :ci Group?, #31 Actual Each Tests, #32 Use Travis-pro (era of closed beta), #33 Use Travis-pro public beta, #34 Travis-Pro price?, #35
Updating is worthful