2012 12-08-travis-ci-could-do

1,878 views

Published on

10 Things You Didn’t Know Travis-CI Could Do

1 Comment
1 Like
Statistics
Notes
  • download here link 100% working:https://app.box.com/s/olzwnk240vfm2ir8yfdw
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
1,878
On SlideShare
0
From Embeds
0
Number of Embeds
153
Actions
Shares
0
Downloads
4
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

2012 12-08-travis-ci-could-do

  1. 1. 10 Things You Didn’tKnow Travis-CI CouldDo 2012-12-08 RejectTokyoRubyKaigi10 Murahashi “Sanemat” Kenichi
  2. 2. 3510 Things You Didn’tKnow Travis-CI CouldDo 2012-12-08 RejectTokyoRubyKaigi10 Murahashi “Sanemat” Kenichi
  3. 3. 3510 Things You Didn’tKnow Travis-CI CouldDo 2012-12-08 RejectTokyoRubyKaigi10 Murahashi “Sanemat” Kenichi JEG2
  4. 4. #1 Play Nethackhttp://www.spyderbytedesign.com/sites/default/files/images/20123105093356.png
  5. 5. #1 Play Nethacklanguage: rubyrvm: 1.9.3before_script: - sudo apt-get install nethack-consolescript: - PATH=$PATH:/usr/games nethack
  6. 6. #1 Play Nethacklanguage: rubyrvm: 1.9.3before_script: - sudo apt-get install nethack-consolescript: - PATH=$PATH:/usr/games nethack
  7. 7. #1 Play Nethacklanguage: rubyNetHack, Copyright 1985-2003rvm: 1.9.3 By Stichting Mathematisch Centrum before_script:and M. Stephenson. - sudo apt-get install nethack-console See license for details. script: - PATH=$PATH:/usr/games nethackShall I pick a characters race, role, genderand alignment for you? [ynq]
  8. 8. #1 Play Nethacklanguage: rubyNetHack, Copyright 1985-2003rvm: 1.9.3 By Stichting Mathematisch Centrum before_script:and M. Stephenson. - sudo apt-get install nethack-console See license for details. script: - PATH=$PATH:/usr/games nethackShall I pick a characters race, role, genderand alignment for you? [ynq] Timeout
  9. 9. #2 Play Nethack!language: rubyrvm: 1.9.3before_script: - sudo apt-get install nethack-consolescript: - yes y | PATH=$PATH:/usr/gamesnethack
  10. 10. #2 Play Nethack!NetHack (gettty):Invalid argumententust play from aterminal.
  11. 11. #3 Play Minecraftlanguage: javabefore_script: wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jarscript: java -cp minecraft.jar net.minecraft.LauncherFrame
  12. 12. #3 Play MinecraftExecuting your script (java -cpminecraft.jar net.minecraft.LauncherFrame)took longer than 30 minutes and wasterminated. Timeout
  13. 13. #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.
  14. 14. Inspire from JEG2 JEG2• Ten Things You Didnt Know Rails Could Do• Ten Things You Didnt Know Ruby Could Do
  15. 15. #0 Who am Iname: Murahashi Sanemat Kenichienv:- COMPANY=zynga DOMAIN=gamePRODUCT=cityville, words with friends- COMPANY=mr taddy DOMAIN=e-commerce PRODUCT=oh my glasses
  16. 16. #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 ForCapybara, #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 Nottherubyracer, 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
  17. 17. #0 We are Hiring!
  18. 18. #0 We are Hiring! @sanemat October, 2012~
  19. 19. #0 We are Hiring! @libkazz
  20. 20. #0 We are Hiring! @kei_s
  21. 21. #0 We are Hiring! @machida
  22. 22. #0 We are Hiring! @is8r
  23. 23. #0 We are Hiring! @jugyoSeptember, 2012 ~ November, 2012
  24. 24. #0 We are Hiring!
  25. 25. #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 ForCapybara, #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 Nottherubyracer, 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
  26. 26. #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
  27. 27. #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
  28. 28. #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
  29. 29. #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
  30. 30. #7 32bit Ubuntu• “oneiric32_base”• Ubuntu 11.10, 32bit• https://github.com/michaelklishin/sous- chef/blob/master/Vagrantfile.sample
  31. 31. #7 32bit Ubuntu• “oneiric32_base”• Ubuntu 11.10, 32bit Sad• https://github.com/michaelklishin/sous- chef/blob/master/Vagrantfile.sample
  32. 32. #8 All in One• https://github.com/travis-ci/travis- cookbooks/ci_environment
  33. 33. #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
  34. 34. #9 Quick Feedback
  35. 35. #9 Quick Feedback Only Travis-pro
  36. 36. #10 Freenode• irc.freenode.net#travis
  37. 37. #10 Freenode• irc.freenode.net#travis People are gathered, only when the error came out incomprehensible.
  38. 38. #11 Mailing List• http://groups.google.com/group/travis-ci
  39. 39. #0 We are Hiring!
  40. 40. #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 ForCapybara, #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 Nottherubyracer, 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
  41. 41. #12 Role Model: qa@itTravis 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
  42. 42. #12 Role Model: qa@itTravis CIでサーバ側のブラウザはどう設定すれば良い? - QA@ITlanguage: rubyrvm: 1.9.3bundler_args: --without development:production 8 linesbefore_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
  43. 43. #13 Role Models: soryu Gather .travis.yml sanemat/soryu
  44. 44. #13 Role Models: soryu Source Gather .travis.yml sanemat/soryu O R Y U
  45. 45. #13 Role Models: soryu Source Gather .travis.yml sanemat/soryu O R Y U Please Pull Request
  46. 46. #0 We are Hiring!
  47. 47. #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 ForCapybara, #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 Nottherubyracer, 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
  48. 48. #14 Only MAJOR MINOR TEENYrvm: - 1.9.3
  49. 49. #14 Only MAJOR MINOR TEENYrvm: Do not specify - 1.9.3 patch level like 1.9.3-p327
  50. 50. #15 Bundler Versionbefore_install: - gem update bundler
  51. 51. #15 Bundler Versionbefore_install: - gem update bundler bundle --version #=> 1.1 bundle --version #=> 1.2
  52. 52. #16 For Capybarabefore_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start
  53. 53. #16 For Capybarabefore_script: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start
  54. 54. #17 Reduce Call Rakebefore_script: - rake db:create - rake db:migratescript: - rake specbefore_script: - rake db:create db:migratescript: - rake spec
  55. 55. #17 Reduce Call Rakebefore_script: - rake db:create - rake db:migratescript: - rake specbefore_script: - rake db:create db:migratescript: - rake spec
  56. 56. #18 RAILS_ENV- rake db:create- RAILS_ENV=test rake db:create
  57. 57. #18 RAILS_ENV- rake db:create development, test- RAILS_ENV=test rake db:create test
  58. 58. #19 rake spec vs rspec$ rake spec$ rspec
  59. 59. #19 rake spec vs rspec$ rake spec purge, migrate, test$ rspec only test
  60. 60. #20 rake spec options$ rake spec SPEC=path/to/fileSPEC_OPT=’-fd’$ rspec -fd path/to/file
  61. 61. #20 rake spec options SPEC, SPEC_OPT$ rake spec SPEC=path/to/fileSPEC_OPT=’-fd’$ rspec -fd path/to/file
  62. 62. #21 rake cucumber options$ rake cucumber FEATURE=path/to/file$ cucumber path/to/file
  63. 63. #21 rake cucumber options FEATURE$ rake cucumber FEATURE=path/to/file$ cucumber path/to/file
  64. 64. #22 rspec Format Document$ rspec -fd --color
  65. 65. #22 rspec Format Document$ rspec -fd --color
  66. 66. #23 rake COMMAND --trace$ rake db:migrate --trace
  67. 67. #23 rake COMMAND --trace$ rake db:migrate --trace
  68. 68. #24 Current My Bestbefore_script: - RAILS_ENV=test bundle exec rakedb:create db:schema:loadscript:- bundle exec rspec -fd
  69. 69. #24 Current My Bestbefore_script: - RAILS_ENV=test bundle exec rakedb:create db:schema:loadscript:- bundle exec rspec -fd
  70. 70. #0 We are Hiring!
  71. 71. #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 ForCapybara, #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 Nottherubyracer, 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
  72. 72. #25 bundler_args, -- withoutbundler_args: --deployment --without developmentproduction
  73. 73. #25 bundler_args, -- withoutbundler_args: --deployment --without developmentproduction
  74. 74. #26 capistrano/bundlerhttps://github.com/carlhuda/bundler/blob/master/lib/bundler/deployment.rb
  75. 75. #26 capistrano/bundlerhttps://github.com/carlhuda/bundler/blob/master/lib/bundler/deployment.rb
  76. 76. #27 Gemfile GroupGemfile
  77. 77. #27 Gemfile GroupGemfile Gemfileのgroup で:production, :development, :test 以外 は気をつけて使う « 實 松アウトプット
  78. 78. #28 Remove Unnecessary GemsRemove debugger, therubyracer(libv8)from Travis-CI Environment
  79. 79. #28 Remove Unnecessary GemsRemove debugger, therubyracer(libv8)from Travis-CI Environment Travis-ci環境からdebuggerは 外しておけ « 實松アウト プット
  80. 80. #29 Not therubyracer, But nodejsx therubyracero nodejs
  81. 81. #29 Not therubyracer, But nodejsx therubyracero nodejs Travis-CI has Node.js
  82. 82. #30 Use :ci Group?Use debugger, pry-rails in testenvironment, butthese areunnecessary in travisenvironmentgroup :ci
  83. 83. #30 Use :ci Group?Use debugger, pry- bundler-args:rails in test - withoutenvironment, but developmentthese are production testunnecessary in travisenvironment capistrano :set, :without:group :ci [:development, :test, :ci]
  84. 84. #31 Actual Each TestsSmall toy appdepends on spin-uptime, but actualmostly spends eachtests.
  85. 85. #31 Actual Each TestsSmall toy app database cleaner,depends on spin-up fixture, fixturetime, but actual replacement, mock,mostly spends each stub, ...tests.
  86. 86. #0 We are Hiring!
  87. 87. #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 ForCapybara, #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 Nottherubyracer, 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
  88. 88. #32 Use Travis-pro (era of closed beta) Travis CI: The Travis Plans
  89. 89. #33 Use Travis-pro public betaTravis CI: Shipping the newTravis CI web UI for Travis Pro
  90. 90. #33 Use Travis-pro public betaTravis CI: Shipping the newTravis CI web UI for Travis Pro December 27, 2012
  91. 91. #34 Travis-Pro price?Travis CI: The Travis Plans
  92. 92. #34 Travis-Pro price?Travis CI: The Travis Plans small plan is $129 per month, and our big plan is $249 per month
  93. 93. #35 Updating is worthfulAutomatical update causespain Temporarily, but thisbring happy, I think.
  94. 94. #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 ForCapybara, #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 Nottherubyracer, 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
  95. 95. #0 We are Hiring!

×