Travis CI

Travis CI

My slides from Øredev 2012

5c2b452f6eea4a6d84c105ebd971d2a4?s=128

Konstantin Haase

November 07, 2012
Tweet

Transcript

  1. Travis CI I hear you like Pull Requests

  2. For the code is dark and full of errors. Game

    Of Thrones Home Box Office Inc. A Time Warner Company
  3. Konstantin Haase Open Source Developer github.com/rkh @konstantinhaase

  4. None
  5. Maintainer of Sinatra Rack, Rubinius, Travis CI

  6. “Second to K&R, the most lagom technical book I’ve read.”

    Peter Cooper (Ruby Inside) Discount Code: AUTHD 50% off ebook ($6.50) 40% off print
  7. None
  8. GitHub Oh My God

  9. None
  10. None
  11. None
  12. None
  13. None
  14. None
  15. Time release branches master develop hot xes feature branches Feature

    for future release Tag 1.0 Major feature for next release From this point on, “next release” means the release after 1.0 Severe bug xed for production: hot x 0.2 Bug xes from rel. branch may be continuously merged back into develop Tag 0.1 Tag 0.2 Incorporate bug x in develop Only bug xes! Start of release branch for 1.0 Author: Vincent Driessen Original blog post: http://nvie.com/archives/323 License: Creative Commons
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. None
  23. One does not simply merge a Pull Request! The Lord

    of the Rings New Line Cinema A Time Warner Company
  24. None
  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. ravis CI

  32. None
  33. CIaaS aka the “one click CI system”

  34. None
  35. None
  36. None
  37. None
  38. None
  39. None
  40. None
  41. None
  42. None
  43. None
  44. None
  45. None
  46. None
  47. None
  48. None
  49. None
  50. Three different JVMs, GCC & clang, Six Erlang versions, Clojure,

    Go, Groovy, Three Node.js versions, Haskell, Four Perl versions, Four Python versions plus PyPy, Two PHP versions, Ten (!) different Ruby versions/implementations, Two Scala versions, anything that runs on Linux GUI and Browser Testing (headless X11, Firefox and Chrome), with PhantomJS, Selenium, etc. MySQL, PostgreSQL, MongoDB, CouchDB, Redis, Riak, RabbitMQ, Memcached, Cassandra, Neo4J, ElasticSearch, Kestrel, SQLite, full root access, custom build steps, 3rd-party PPAs Notifications per Email, IRC, GitHub, Campfire, HipChat, Flowdock, Pusher, Web hook more than 15 Programming Languages with multiple implementations
  51. more than 2,250,000 Test Suits 25,000 Open Source Projects more

    than 17,000 Test Suits, 1,000 Private Projects
  52. more than 2,250,000 Test Suits 25,000 Open Source Projects for

    free
  53. 100% Open Source

  54. “What Github did for sharing code, Travis CI will do

    for testing code. The value of this service cannot be overstated. Travis CI is a paradigm shift. The world will be a better place when every open-source developer is running their test suite on Travis CI.” Brian Ford Lead Developer, Rubinius Engine Yard
  55. None
  56. ← Home Travis - an experimental, distributed CI server on

    Heroku We had the I18n gem tested on runcoderun, a great service for open source projects to run continous integration on the web, and this was working very well for us. Unfortunately runcoderun was taken down. So I figured it should be easy to setup a few apps on Heroku and have them run the I18n test suite on different stacks (i.e. Ruby configurations on Heroku). It turns out it is not, apparently. Or I'm just too stupid to do it. Anyway I though I'd write things down so maybe someone else can pick this experiment up and push it a few steps farther. The current state is that Travis can automatically set up a single ci server and 3 ci runners on Heroku. The server app takes the ping from github and pings the 3 runners. Each of the runners forks and immediately returns from the parent (forking) process while the child process runs the build command and posts the result back to the server. The server stores the result and displays it on the builds index page. Everything's cool except that the runner does not work properly on neither aspen-mri-186 (i.e. Ruby 1.8.6) nor bamboo-mri-191 (i.e. Ruby 1.9.1). It seems to work fine on the bamboo-ree-187 stack though and I will leave it running for a while so we can see how it works out over a few commits to the I18n repository. 2010-06-16
  57. ← Home Travis - a distributed build server tool for

    the Ruby community So, I’ve started playing with the idea of a distributed build server tool once again in last year’s December … and Travisis what I came up with. Status quo ▪ Travis is currently running on http://travis.heroku.com and already notifies me about builds that pass or fail when someone pushes to those repositories I’ve registered for testing purposes. ▪ The builds run on a virtual server that Julian Fischer has very kindly granted for this experiment. ▪ The frontend is implemented using Backbone.js. ▪ Build output and status information is “tailed” from the workers to the frontend (i.e. browsers) using websockets via Pusher. It is also pushed back to application (running on Heroku) using a standard REST API. All of these building blocks might change in the future, but here’s an overview of how they currently work together. And here’s a short screencast (the UI has changed a bit in the meanwhile but you’ll get the idea): 1:20 quick demo screencast. 2011-02-05
  58. 5,000 10,000 15,000 20,000 25,000 30,000 2010-12 2011-03 2011-06 2011-09

    2011-12 2012-03 2012-06 2012-09 Active Projects Open Source Private
  59. 50,000 100,000 150,000 200,000 250,000 300,000 2011-03 2011-05 2011-07 2011-09

    2011-11 2012-01 2012-03 2012-05 2012-07 2012-09 Test Suit Executions per Month Open Source Private
  60. Java (1112) 5% Python (2413) 10% PHP (3319) 13% JavaScript

    (3837) 16% Ruby (11752) 48% Ruby (11752) JavaScript (3837) PHP (3319) Python (2413) Java (1112) Erlang (371) C (362) Clojure (333) Haskell (310) Perl (232) Scala (201) Go (134) C++ (132) Other (60) Groovy (34) Open Source Projects by Language 2012-10-26
  61. 2012-10-26 Python (43) 4% PHP (83) 9% JavaScript (47) 5%

    Ruby (742) 77% Ruby (742) JavaScript (47) PHP (83) Python (43) Java (17) Erlang (9) C (1) Clojure (12) Haskell (3) Scala (1) Private Projects by Language
  62. Ruby C++ Scala Perl Erlang PHP Java Python Haskell Groovy

    C JavaScript Clojure Other Go 72.7% 75% 83% 66.7% 65.1% 64.7% 61.4% 44.4% 58.9% 90.3% 88.3% 87.7% 87.3% 85.4% 85.3% 79% 79% 78% 76.3% 76.3% 74.1% 74.1% 70.5% 61.2% Success Rate by Language 2012-10-26 Open Source Private
  63. 20,000 40,000 60,000 80,000 100,000 120,000 11-10 11-12 12-02 12-04

    12-06 12-08 12-10 GitHub Events for Open Source Push Pull Request
  64. 20,000 40,000 60,000 80,000 100,000 120,000 12-04 12-06 12-08 12-10

    GitHub Events for Private Projects Push Pull Request
  65. scalability is not optional

  66. None
  67. ci

  68. ci travis-ci.org

  69. ci travis-ci.org

  70. ci travis-ci.org web next.travis-ci.org

  71. ci travis-ci.org web next.travis-ci.org api api.travis-ci.org

  72. ci travis-ci.org web next.travis-ci.org api api.travis-ci.org

  73. ci web api

  74. ci web api postgres

  75. ci web api postgres hub

  76. ci web api postgres hub AMQP/Redis

  77. ci web api postgres hub AMQP/Redis listener

  78. ci web api postgres hub AMQP/Redis listener

  79. ci web api postgres hub AMQP/Redis listener worker Virtual Machine

    Virtual Machine Virtual Machine
  80. ci web api postgres hub AMQP/Redis listener worker Virtual Machine

    Virtual Machine Virtual Machine admin
  81. ci web api postgres hub AMQP/Redis listener log writer Pusher

    worker Virtual Machine Virtual Machine Virtual Machine admin
  82. ci web api postgres hub AMQP/Redis listener status notifier log

    writer Pusher worker Virtual Machine Virtual Machine Virtual Machine admin
  83. ci web api postgres hub AMQP/Redis listener status notifier log

    writer Pusher worker Virtual Machine Virtual Machine Virtual Machine enqueue admin
  84. ci web api postgres hub AMQP/Redis listener status notifier log

    writer Pusher worker Virtual Machine Virtual Machine Virtual Machine enqueue gate- keeper admin
  85. ci web api postgres hub AMQP/Redis listener status notifier log

    writer Pusher worker Virtual Machine Virtual Machine Virtual Machine enqueue gate- keeper tasks admin
  86. ci web api postgres hub AMQP/Redis listener status notifier log

    writer Pusher worker Virtual Machine Virtual Machine Virtual Machine cli enqueue gate- keeper tasks admin
  87. ci web api postgres hub AMQP/Redis listener status notifier log

    writer Pusher worker Virtual Machine Virtual Machine Virtual Machine cli enqueue gate- keeper tasks admin billing
  88. None
  89. 553

  90. None
  91. None
  92. None
  93. None
  94. “When you don't create things, you become defined by your

    tastes rather than ability. Your tastes only narrow and exclude people. So create.” why the lucky stiff Ruby Art Project by Jonathan G.
  95. None
  96. Thanks konstantin@travis-ci.org @konstantinhaase github.com/rkh