JJ

SHOW AN OPEN SOURCE PROJECT SOME LOVE
AND START USING TRAVIS-CI
Joel Byler
@joelbyler
January 10, 2014
CodeMash 2.0.1....
WHO AM I?
 





JOEL BYLER

 Aspiring Software Craftsman
 Organizer for Cleveland Ruby

Brigade (aka CleRb)
 Enterpris...
WHO ARE YOU?
 Want to get involved in an Open

Source Project?
 Currently maintaining an Open
Source Project and interes...
COMMON PROBLEMS WHEN
SHARING SOURCE CODE
 Work’s on my machine syndrome
 Didn’t realize I need to test on that

version ...
CONTINUOUS INTEGRATION
...is the practice, in software engineering, of merging all
developer working copies with a shared ...
CONTINUOUS INTEGRATION CONTD.
Once the code is built, all tests should run to confirm
that it behaves as the developers exp...
TRAVIS-CI
 Hosted
 Free for open-source projects
 Supports MANY Languages
 Can run against multiple

runtime versions
...
You don’t have to take my word for it.

WHAT PEOPLE ARE SAYING

Sunday, January 12, 14
QUOTES
What Github did for sharing code, Travis CI will do for
testing code
- Brian Ford, Rubinius, @brixen

I'm sure ther...
TRAVIS BUILD LIFE-CYCLE
Any of the following steps will fail build when finishing
with a non-zero exit code
-clone github r...
Test all the things!

LANGUAGES

Sunday, January 12, 14
WORKS FOR YOUR LANGUAGE
(PROBABLY)
C

JAVASCRIPT (WITH

C++

NODE.JS)
OBJECTIVE-C
PERL
PHP
PYTHON
RUBY
SCALA

CL...
RUBY
.travis.yml

Super simple!

Sunday, January 12, 14
COMPLEX BUILD

Sunday, January 12, 14
JAVA
.travis.yml

Sunday, January 12, 14
JAVASCRIPT
travis.yml

Sunday, January 12, 14
THE BUILD IS PASSING!
badges for your website

Sunday, January 12, 14
DEMO
https://github.com/joelbyler/roman_numeral.js

 travis gem
 travis login & travis init
 notifications
 travis-lint...
DEMO
https://github.com/joelbyler/roman_numeral.js/blob/master/media/TravisCI.mov?raw=true

Sunday, January 12, 14
Sunday, January 12, 14
Sunday, January 12, 14
Know that merging a pull request won’t
break the build.

PULL REQUESTS

Sunday, January 12, 14
THE BUILD IS PASSING!

Sunday, January 12, 14
Why start trusting a human now?

AUTO DEPLOYMENT

Sunday, January 12, 14
CONTINUOUS DEPLOYMENT
In the same vein the practice of continuous delivery
further extends CI by making sure the software ...
DEPLOY YOUR CHANGES TO:
Heroku
Nodejitsu
Engine Yard
OpenShift
cloudControl
RubyGems
PyPI
NPM

Sunday, January 12,...
A RUBY EXAMPLE, DEPLOY TO
RUBYGEMS.ORG

Sunday, January 12, 14
A NODE EXAMPLE, DEPLOY TO
NPMJS.ORG

Sunday, January 12, 14
ADVANCED FEATURES
 parallelized builds (unit vs int. tests)
 databases
 GUI & Headless browser testing

Sunday, January...
Not a sharer?

PRIVATE REPOSITORIES

Sunday, January 12, 14
PRICING

as of 1/9/2014

Sunday, January 12, 14
ALTERNATIVES
 drone.io (free for open source)
 werker.com (free beta)
 circleci.com
 cisimple.com
 tddium.com

Sunday...
RESOURCES
Travis-CI
https://travis-ci.org/
Travis-CI Blog
http://about.travis-ci.org/blog/
Travis-CI Source
https://github...
RESOURCES CONTINUED
Code Coverage
https://coveralls.io/
Dependencies
https://gemnasium.com/
Version Badge
http://badge.fur...
THAT’S A WRAP!
Joel Byler
@joelbyler

Sunday, January 12, 14
COME FLOAT WITH US!
Located on a 10,000 square foot boat on the
Cleveland waterfront, our team exemplifies
how Agile value...
Upcoming SlideShare
Loading in...5
×

Show an Open Source Project Some Love and Start Using Travis-CI

614

Published on

Lots of us are looking for an open source project to help with, but sometimes it is hard to find a way to contribute. I'd like to recommend that folks start to consider using Travis-CI and adding Travis-CI scripts to projects that don't already have them. Lets look at what it takes to build a project using Travis and the benefits that a project can take advantage of if they use the service.

This was originally presented at CodeMash v2.0.1.4 in Sandusky, Ohio on January 10, 2014

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
614
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Show an Open Source Project Some Love and Start Using Travis-CI

  1. 1. JJ SHOW AN OPEN SOURCE PROJECT SOME LOVE AND START USING TRAVIS-CI Joel Byler @joelbyler January 10, 2014 CodeMash 2.0.1.4 Kalihari Resort Sandusky, OH Sunday, January 12, 14
  2. 2. WHO AM I? JOEL BYLER  Aspiring Software Craftsman  Organizer for Cleveland Ruby Brigade (aka CleRb)  Enterprise Java developer  Actively growing my Ruby and JavaScript skills Sunday, January 12, 14
  3. 3. WHO ARE YOU?  Want to get involved in an Open Source Project?  Currently maintaining an Open Source Project and interested in your CI options? Sunday, January 12, 14
  4. 4. COMMON PROBLEMS WHEN SHARING SOURCE CODE  Work’s on my machine syndrome  Didn’t realize I need to test on that version of ruby/node/etc.  Pull requests - how do I know if this will break the build?  Would love run tests on commit, but don’t have $$$ for equipment. Sunday, January 12, 14
  5. 5. CONTINUOUS INTEGRATION ...is the practice, in software engineering, of merging all developer working copies with a shared mainline several times a day. ~Wikipedia ...is a software development practice where members of a team integrate their work frequently ~Martin Fowler Sunday, January 12, 14
  6. 6. CONTINUOUS INTEGRATION CONTD. Once the code is built, all tests should run to confirm that it behaves as the developers expect it to behave. ~Wikipedia ...verified by an automated build (including test) to detect integration errors as quickly as possible... ~Martin Fowler Sunday, January 12, 14
  7. 7. TRAVIS-CI  Hosted  Free for open-source projects  Supports MANY Languages  Can run against multiple runtime versions  MOAR! Sunday, January 12, 14
  8. 8. You don’t have to take my word for it. WHAT PEOPLE ARE SAYING Sunday, January 12, 14
  9. 9. QUOTES What Github did for sharing code, Travis CI will do for testing code - Brian Ford, Rubinius, @brixen I'm sure there was life before @travisci, but I choose to ignore it. - Jeff Casimir, Jumpstart Lab/Hungry Academy @j3 I have used many CI systems, but Travis is the most awesome one so far!! - Aslak Hellesoy, THE Cucumber Guy, @aslak_hellesoy Sunday, January 12, 14
  10. 10. TRAVIS BUILD LIFE-CYCLE Any of the following steps will fail build when finishing with a non-zero exit code -clone github repository -cd to new directory -before_install: prepare the system -install: install prerequisites or dependencies -before_script: prepare your build for testing -script: specific to project language ==== build will not fail past this step ==== -after_success: -after_failure: -after_script: Sunday, January 12, 14
  11. 11. Test all the things! LANGUAGES Sunday, January 12, 14
  12. 12. WORKS FOR YOUR LANGUAGE (PROBABLY) C JAVASCRIPT (WITH C++ NODE.JS) OBJECTIVE-C PERL PHP PYTHON RUBY SCALA CLOJURE ERLANG GO GROOVY HASKELL JAVA Sunday, January 12, 14
  13. 13. RUBY .travis.yml Super simple! Sunday, January 12, 14
  14. 14. COMPLEX BUILD Sunday, January 12, 14
  15. 15. JAVA .travis.yml Sunday, January 12, 14
  16. 16. JAVASCRIPT travis.yml Sunday, January 12, 14
  17. 17. THE BUILD IS PASSING! badges for your website Sunday, January 12, 14
  18. 18. DEMO https://github.com/joelbyler/roman_numeral.js  travis gem  travis login & travis init  notifications  travis-lint gem for validation Sunday, January 12, 14
  19. 19. DEMO https://github.com/joelbyler/roman_numeral.js/blob/master/media/TravisCI.mov?raw=true Sunday, January 12, 14
  20. 20. Sunday, January 12, 14
  21. 21. Sunday, January 12, 14
  22. 22. Know that merging a pull request won’t break the build. PULL REQUESTS Sunday, January 12, 14
  23. 23. THE BUILD IS PASSING! Sunday, January 12, 14
  24. 24. Why start trusting a human now? AUTO DEPLOYMENT Sunday, January 12, 14
  25. 25. CONTINUOUS DEPLOYMENT In the same vein the practice of continuous delivery further extends CI by making sure the software checked in on the mainline is always in a state that can be deployed to users and makes the actual deployment process very rapid. ~Wikipedia A natural consequence of this is that you should also have scripts that allow you to deploy into production with similar ease. ~Martin Fowler Sunday, January 12, 14
  26. 26. DEPLOY YOUR CHANGES TO: Heroku Nodejitsu Engine Yard OpenShift cloudControl RubyGems PyPI NPM Sunday, January 12, 14
  27. 27. A RUBY EXAMPLE, DEPLOY TO RUBYGEMS.ORG Sunday, January 12, 14
  28. 28. A NODE EXAMPLE, DEPLOY TO NPMJS.ORG Sunday, January 12, 14
  29. 29. ADVANCED FEATURES  parallelized builds (unit vs int. tests)  databases  GUI & Headless browser testing Sunday, January 12, 14
  30. 30. Not a sharer? PRIVATE REPOSITORIES Sunday, January 12, 14
  31. 31. PRICING as of 1/9/2014 Sunday, January 12, 14
  32. 32. ALTERNATIVES  drone.io (free for open source)  werker.com (free beta)  circleci.com  cisimple.com  tddium.com Sunday, January 12, 14
  33. 33. RESOURCES Travis-CI https://travis-ci.org/ Travis-CI Blog http://about.travis-ci.org/blog/ Travis-CI Source https://github.com/travis-ci Continuous Integration, by Martin Fowler http://www.martinfowler.com/articles/continuousIntegration.html Sunday, January 12, 14
  34. 34. RESOURCES CONTINUED Code Coverage https://coveralls.io/ Dependencies https://gemnasium.com/ Version Badge http://badge.fury.io/ Quality Analysis https://codeclimate.com/ Sunday, January 12, 14
  35. 35. THAT’S A WRAP! Joel Byler @joelbyler Sunday, January 12, 14
  36. 36. COME FLOAT WITH US! Located on a 10,000 square foot boat on the Cleveland waterfront, our team exemplifies how Agile values & principles are practiced. Come float, deliver, and learn with us, or leverage our expertise to help you change your company culture. @leandog leandog.com GDI Sunday, January 12, 14
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×