<metaname="description" content="Full Stack Python explains each layer of the web application stack, from the server up through the rendering in a user's browser.">
<p>Continuous integration (CI) automates building, testing and deploying
applications.</p>
<h2>Why is continuous integration important?</h2>
<p>When CI is set up well it can dramatically reduce deployment times by
eliminating manual steps and ensure code does not have bugs that are being
checked by automated tests. Source code changes as a project evolves.
CI combined with unit and integration tests check that code modifications
do not break existing tests ensure the software works as intended.</p>
<h2>Continuous integration example</h2>
<p>The following picture represents a high level perspective on how continuous
integration and deployment can work. </p>
<p><imgsrc="theme/img/continuous-integration.png" width="100%" class="technical-diagram" alt="One potential way for continuous integration to work." /></p>
<p>In the above diagram, when new code is commited to a source repository
there is a hook that notifies the continuous integration server that new
code needs to be built (the continuous integration server could also
poll the source code repository if a notification is not possible).</p>
<p>The continuous integration server pulls the code to build and test it. If
all tests pass, the continuous integration server begins the deployment
process. The new code is pulled down to the server where the deployment is
taking place. Finally the deployment process is completed via restarting
services and related deployment activities.</p>
<p>There are many other ways a continuous integration server and its
deployments can be structured. The above was just one example of a
relatively simple set up.</p>
<h2>Open source CI projects</h2>
<ul>
<li>
<p><ahref="http://jenkins-ci.org/">Jenkins</a> is a common CI server for building and
deploying to test and production servers.
<ahref="https://github.com/jenkinsci/jenkins">Jenkins source code is on GitHub</a>.</p>
</li>
<li>
<p><ahref="http://www.go.cd/">Go CD</a> is a CI server by
<ahref="http://www.thoughtworks.com/">ThoughtWorks</a> that was designed with best
practices for the build and test & release cycles in mind.
<ahref="https://github.com/gocd/gocd">Go CD source code is on GitHub</a>.</p>
</li>
<li>
<p><ahref="http://stridercd.com/">Strider</a> is a CI server written in node.js.
<ahref="https://github.com/Strider-CD/strider">Strider source code is on GitHub</a>.</p>
</li>
<li>
<p><ahref="http://buildbot.net/">BuildBot</a> is a continuous integration <strong>framework</strong>
with a set of components for creating your own CI server. It's written in
Python and intended for development teams that want more controller over
their build and deployment pipeline.
<ahref="https://github.com/buildbot/buildbot">BuildBot source code is on GitHub</a>.</p>
</li>
</ul>
<h2>Hosted CI services</h2>
<ul>
<li>
<p><ahref="https://travis-ci.org/">Travis CI</a> provides free CI for open source
projects and has a <ahref="https://travis-ci.com/">commercial version</a> for
private repositories.</p>
</li>
<li>
<p><ahref="https://www.atlassian.com/software/bamboo">Bamboo</a> is
<ahref="https://www.atlassian.com/">Atlassian</a>'s hosted continuous integration that
is also free for open source projects.</p>
</li>
<li>
<p><ahref="https://circleci.com/">Circle CI</a> works with open or closed source projects
on GitHub and can deploy them to Heroku if builds are successful.</p>
</li>
<li>
<p><ahref="https://www.shippable.com/">Shippable</a> uses Docker containers to speed
the build and integration process. It's free for public repositories.</p>
</li>
<li>
<p><ahref="https://drone.io/">Drone</a> is another CI service that also provides free
builds for open source projects.</p>
</li>
<li>
<p><ahref="https://www.codeship.io/">Codeship</a> provides continuous integration for
Python 2.7.</p>
</li>
<li>
<p><ahref="https://snap-ci.com/">Snap</a> is a CI server and build pipeline tool for
both integrating and deploying code.</p>
</li>
</ul>
<h2>Continuous integration resources</h2>
<ul>
<li>
<p><ahref="http://martinfowler.com/articles/continuousIntegration.html">What is continuous integration?</a>
is a classic detailed article by Martin Fowler on the concepts behind CI
and how to implement it.</p>
</li>
<li>
<p><ahref="http://www.airpair.com/continuous-deployment/posts/continuous-deployment-for-practical-people">Continuous Deployment For Practical People</a>
is not specific to Python but a great read on what it entails.</p>
</li>
<li>
<p><ahref="http://bitcubby.com/continuous-integration-delivery-illustrated/">Continuous Integration & Delivery - Illustrated</a>
uses well done drawings to show how continuous integration and delivery
works for testing and managing data.</p>
</li>
<li>
<p><ahref="http://www.rackspace.com/blog/diving-into-continuous-integration-as-a-newbie/">Diving into continuous integration as a newbie</a>
is a retrospective on learning CI from a Rackspace intern on how she learned
<h4>Interested in a complete Full Stack Python book with detailed tutorials and example code? Sign up here and you'll get an alert email if a book is created. No other emails will be sent other than sign up confirmation.</h4>
$("#mc-embedded-subscribe-form").unbind('submit');//remove the validator so we can get into beforeSubmit on the ajaxform, which then calls the validator