Travis vs Circle vs Jenkins
PHPCon Poland 2016
building stuff
Photo by Michael Himbeault on Flickr
Copyright Sybren Stuvel and licensed for reuse under this Creative Commons License.
http://www.l2jserver.com/forum/viewtopic.php?t=31413
http://www.l2jserver.com/forum/viewtopic.php?t=31413
http://www.l2jserver.com/forum/viewtopic.php?t=31413
http://www.l2jserver.com/forum/viewtopic.php?t=31413
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
- 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
- ship it to master
- it's deployable when ever you want
CONTINUOUS DELIVERY
- changes on master waiting to be deployed
- bothered with working on other things
- merge storms
- just ship it!
CONTINUOUS DEPLOYMENT
Any questions ?
MIro svrtan
- senior problem
makersolver - work in TicketSwap
- @msvrtan
Jenkins CI
Circle CI
Travis CI
Which one TO pick?
We don't wanna do ops
- we have no ops ppl or just no resources
- we rent stuff
- we outsource infrastructure
- not our core bussiness
We don't wanna do ops
WE NEED TO KEEP IT HOME
- we have infrastructure/servers + ops
- must be behind FW
- or just paranoid
WE NEED TO KEEP IT HOME
Jenkins
- open source
- easy to install
- setup <1hour
- will need some plugins
but...
enterprise on-premise
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
Setup Circle ci
- registration takes <1min
- uses Github OAuth
- adding new project <1min
- 3 clicks
Add circle.yml
Circle CI
pricing
- private projects
- 1 container free
- $50 per container
- public projects
- 4 containers free
- $50 per container
Multiple versions
- test same code using multiple language versions
- or different databases
- or ...
Multiple versions
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
JOB page
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
Customizable Builds
- multiple builds on each push
- or in pipeline
- when X finishes, start Y
Customizable Builds
PARALLELIZE TESTS
- tests take lot of time
- automatic 'sharding' across nodes
PARALLELIZE TESTS
source code management support
Works with github?
Works with BITBUCKET?
Works with GITLAB?
Works with basic git repo?
Works with *anything* you can throw at it?
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
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
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
- dirty files
- watchout and clean it before/after build
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
Just continous delivery
- slack style
Just continous delivery
- slack style
Continuos deployment
- we can create a build from master now
- save it somewhere
- lets just deploy it when tests are green
Continuos deployment
Debug build
- instead of sending new commits with fixes
- lets ssh into the build
- lets get some logs/files to check
Debug build
- it's your server :)
Debug build
- debug in beta (add it to .travis.yml where you want a break point)
- add AWS S3 bucket for logs/artifacts
Debug build
- enable ssh
- access to logs/artifacts directly
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 10x on demand
- they notify you when other stuff is not working properly
- github down/bug
- 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!
Jenkins vs Circle vs Travis
By Miro Svrtan
Jenkins vs Circle vs Travis
PHPCon Poland 2016 October 1st 2016
- 2,864