## Using [Codeship](http://codeship.io/) for ## Continuous Integration ## and Deployment HMTL, July 2014
## Continuous Inte-whut? When a CI server spots a change in your repository, it: * Builds the project * Tests the project * Notifies you if it worked * Or not (in which case, you fix it)
## Continuous Inte-why? * Helps ensure changes from multiple sources integrate properly. * Doing it continuously means you see problems earlier and can fix faster. * Martin Fowler has [a better explanation](http://martinfowler.com/articles/continuousIntegration.html).
## Continuous Deplo-wuh? A natural follow-on from Continuous Integration. If a commit builds and passes tests, *automatically deploy it to production*.
## Continuous Deplo-why? * Deploys always match a commit in source control. * Code is always tested before deploy. * Forces deployment to be automated, not ad-hoc. * See [Why Continuous Deployment?](http://www.startuplessonslearned.com/2009/06/why-continuous-deployment.html)
## Let's assume... For the purposes of this talk that all this is a good idea, and get into the how.
## Why Codeship? * SaaS means no complicated install (cf. [Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins)) * Private project [pricing](https://www.codeship.io/pricing) is fair and accessible (cf. [Travis CI](https://travis-ci.com/plans)) * Config is straightforward * Established (started in 2011) and has a business model
## Free plan: $0 * 5 private projects * 100 builds a month * Unlimited team size * 1 concurrent build
## Basic plan: $49/mo * Unlimited private projects * Unlimited builds * Unlimited team size * 1 concurrent build * premium support
## Pro plan: $149/mo Same as basic but concurrent builds bumped from 1 to 3.
## How does it work? * Watches for a push to repository * Starts a VM (Ubuntu 12.10) * Runs your build commands * Runs yout test commands * If all's OK, runs your deploy commands
## Integrations ### Deployment targets * Heroku * Engine Yard * Google App Engine * Digital Ocean * Elastic Beanstalk * Nodejitsu * Rackspace * ...and [more](https://www.codeship.io/#integrations)
## Integrations ### Deployment targets Also supports custom scripts, so... * SFTP * SCP * Rsync * SSH * S3 (yay) * etc
## Technologies ### Languages and frameworks * Node * Ruby * Python * PHP * Java * Go * Dart * Scala * Groovy
## Technologies ### Databases * MySQL * PostgreSQL * MongoDB * Redis * Memcached * ElasticSearch
## Nice things Build success (or fail) notifications can be sent to: * Email * Hipchat * Slack * Flowdock * Campfire * Grove * Webhook * Github Status API
## Nice things When everything has run, you can ssh into the VM and have a poke around. Particularly useful for debugging failed builds.
## Nice things VM image includes useful testing tools: * PhantomJS * CasperJS * Selenium * Firefox * Chrome
## Not so nice things The base image for the VM is fixed; can't change that. Not a problem unless you need a specific distro/version as part of your stack.
## Not so nice things Currently no way to customise notifications, so can't pass detailed results, build URLs or rude messages.
## Questions ### ?
### STFU Paul Fanks Presented at [HMTL](http://hmtl6.github.io/2014-09-17-eternal-september/), 17th September 2014 Built with [Reveal.js](http://lab.hakim.se/reveal-js/)