Travis vs Circle vs Jenkins
Bulgaria PHP 2016
building stuff
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3000838/4696338852_bde479b169_o.jpg)
Photo by Michael Himbeault on Flickr
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3000857/frustrated.jpg)
Copyright Sybren Stuvel and licensed for reuse under this Creative Commons License.
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3000875/BxcvvQhIQAALq7m.jpg)
http://www.l2jserver.com/forum/viewtopic.php?t=31413
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3000878/adn5xmm_460s.jpg)
http://www.l2jserver.com/forum/viewtopic.php?t=31413
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3000886/kbupg0.jpg)
http://www.l2jserver.com/forum/viewtopic.php?t=31413
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3000888/16dbde67581db62f53479f556c9ee19fd8e94eeb8108fd8452f2908af502b4e9.jpg)
http://www.l2jserver.com/forum/viewtopic.php?t=31413
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3000889/bc1b66127828082ff9eca00f2736364e6f23c873b8d1c96687c117c700714b95.jpg)
http://www.l2jserver.com/forum/viewtopic.php?t=31413
BE BETTER
- wanted less frustrating environment
- find bugs when I introduce them
- started writing tests
- got to run them now
- make others run them too
Automation
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3000983/maxresdefault.jpg)
- feature as a list of smaller changes
- push changes often
- easy to merge in (avoiding big merges)
- pull changes often
CONTINUOUS INTEGRATION
- changes ready to merge in
- tests verified all is ok
- merge it to master
- create a build artifact
- it's deployable when ever we want
CONTINUOUS DELIVERY
- changes on master waiting to be deployed
- bothers while working on other things
- merge storms
- just ship it!
CONTINUOUS DEPLOYMENT
Any questions ?
MIro svrtan
- developer in TicketSwap
- ZgPHP founder & organizer
- WebCamp Zagreb co-founder
- @msvrtan
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996923/2988888.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996929/vertical-00bdfebf4960c363bb49369a9b7687f4c2232859b0f9d095b6997573b4e29c66.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996932/gitlab.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996937/Shippable-Logo-4.16.15-300x240.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996946/Bamboo-URL.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996952/codeship-logo-horizontal.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996953/continuous-php-logo.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996966/logo_TeamCity.png)
Jenkins CI
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
Circle CI
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
Travis CI
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
Which one TO pick?
We don't wanna do ops
- no ops person/team
- no resources?
- we rent stuff
- we outsource infrastructure
- not our core business
We don't wanna do ops
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
WE NEED TO KEEP IT HOME
- own infrastructure/servers
- have ops person/team?
- must be behind FW
- or just paranoid
WE NEED TO KEEP IT HOME
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
Jenkins
- open source CI server
- easy to install
- setup <1hour
- will need some plugins
but...
enterprise on-premise
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
jump on quickly
- small company/team/solo dev
- code is on a private github repo
- painless dive into world of automation
- just wanna check "continuous *"
jump on quickly
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
Setup Circle ci
- registration takes <1min
- uses Github OAuth
- adding new project <1min
- 3 clicks
Add circle.yml
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007032/Screen_Shot_2016-09-15_at_10.03.35.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007149/Screen_Shot_2016-09-15_at_10.44.35.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007147/Screen_Shot_2016-09-15_at_10.44.48.png)
Circle CI
pricing
- private projects
- 1 container free
- $50 per container/month
- public projects
- 4 containers free
- $50 per container/month
Multiple versions
- test same code using multiple language versions
- or different databases
- or ...
Multiple versions
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
We have our own orm
- need to test it against multiple versions of PHP
- and different databases
Setup TRAVIS ci
- registration takes <1min
- uses Github OAuth
- adding new project <1min
.travis.yml
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007060/Screen_Shot_2016-09-15_at_10.12.34.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007095/Screen_Shot_2016-09-15_at_10.13.34.png)
JOB page
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007066/Screen_Shot_2016-09-15_at_10.13.45.png)
Travis ci
pricing
- private projects
- 100 builds free
- $129 for 2 concurent jobs
- $249 for 5 concurent jobs
- $489 for 10 concurent jobs
- public projects
- 4 concurent jobs free
Travis ci
public vs private repos
- separate web sites
- waiting queue time on private < public
Customizable JOBS
- multiple jobs inside one build
- each prepared differently
- code quality check
- browser tests
CUSTOMIZABLE JOBS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
Customizable Builds
- multiple builds on each push
- or in pipeline
- when X finishes, start Y
Customizable Builds
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
PARALLELIZE TESTS
- tests take lot of time
- automatic 'sharding' across nodes
PARALLELIZE TESTS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
source code management support
Works with github?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
Works with BITBUCKET?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
Works with GITLAB?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
Works with basic git repo?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
Works with *anything* you can throw at it?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
Quick feedback on critical + long tests
- not critical but nice to have tests
- take a long time
- testing 3rd party
- slow browser tests
- we want quick feedback loop
Quick feedback on critical + long tests
- separate them
- run
- critical on each push
- nice to have from time to time
Quick feedback on critical+ long tests
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
Any questions on this part?
or 'Still no questions?'
Clean builds vs performance
- clean build: no artifacts from previous runs
Clean build
- start each build from scratch
- takes time to setup
- dependencies
- data
- they offer caching of dependencies
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
Dirty builds
- just continues where last one stopped
- reuses stuff from previous runs
- no need to install library again (composer,npm,..)
- can save lot of time on each build
- dirty data/files
- problems with paralelization
- watchout and clean it before/after build
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
Just continous delivery
- 1 click style
- we can create a build from master now
- save it somewhere
- lets deploy it from phone using 1 button
Just continous delivery
- 1 click style
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
Just continous delivery
- slack style
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007261/imageedit_1_3265263009.png)
Just continous delivery
- slack style
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
Continuos deployment
- we can create a build from master now
- save it somewhere
- lets just deploy it when tests are green
Continuos deployment
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
Debug build
- instead of sending new commits with fixes
- lets ssh into the build
- save logs/artfacts
Debug build
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996643/logo.png)
- it's your server :)
Debug build
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996634/TravisCI-Mascot-1-bc6a3179f3e8e1ab1456634bd55a448a.png)
- debug in beta (add it to .travis.yml where you want a break point)
- add AWS S3 bucket for logs/artifacts
Debug build
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/2996637/circle-ci-service-128.png)
- enable ssh
- access to logs/artifacts directly
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007307/imageedit_3_8269198350.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/75324/images/3007309/Screen_Shot_2016-09-15_at_11.20.18.png)
saas warnings
- dependencies change
- you might need newer version of X
- your app doesn't work with newer version of Y
- they don't announce all changes in advance
saas warnings
- shared resource
- variations in built times
saas warnings
- you might need some ops knowledge for complicated scenarios
saas - the good parts
- they take care of underlying infrastructure
- scale X times on demand
- they notify you when other stuff is not working properly
- github down or webhooks not working
- amazon/heroku unavailable
self hosted - good parts
- your own hardware
- buy killer CPUs/memory
- each job/build can have more then 1 CPU
- distribute work across slave servers
questions?
Thank you
Miro Svrtan
@msvrtan
we are hiring!
https://legacy.joind.in/talk/view/18978
Jenkins vs Circle vs Travis - BGPHP16
By Miro Svrtan
Jenkins vs Circle vs Travis - BGPHP16
Bulgaria PHP 2016 October 8th 2016
- 2,895