<metaname="description" content="Continuous integration automatically rebuilds and deploys applications as developers commit code. Learn more on Full Stack Python.">
<divstyle="padding: 0 0 20px 0; margin: 0 0 20px 0; background-color: #22B24C;">
<divclass="container">
<h2style="color: #fff; margin: 20px 40px 0 0;"><ahref="https://www.gumroad.com/l/python-deployments" style="color: #fff">The Full Stack Python Guide to Deployments book</a> has been released!</h2>
</div>
</div><ahref="https://github.com/makaimc/fullstackpython.com"><imgstyle="position: absolute; top: 0; right: 0; border: 0;" src="/theme/img/fork.png" alt="Fork me on GitHub"></a>
<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 committed 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 control over
their build and deployment pipeline.
<ahref="https://github.com/buildbot/buildbot">BuildBot source code is on GitHub</a>.</p>
</li>
<li>
<p><ahref="https://www.jetbrains.com/teamcity/">TeamCity</a> is JetBrains' closed source
CI server that requires a license to use.</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
<ahref="http://www.deploypython.com/"><imgsrc="//static.fullstackpython.com/fsp-deployment-guide.png" alt="The Full Stack Python Guide to Deployments" width="100%"></a>
<pstyle="font-size: .8em; margin-top: 10px;">Searching for a complete, step-by-step deployment walkthrough? Learn more about <ahref="http://www.deploypython.com/">The Full Stack Python Guide to Deployments book</a>.
</p>
</div>
</div><divclass="panel panel-success">
<divclass="panel-heading">
<h3class="panel-head"><ahref="/table-of-contents.html" style="color: #fff;">Table of Contents</a></h3>
<ahref="/about-author.html" class="list-group-item smaller-item " style='font-family: "Helvetica Neue",sans-serif;'>About the Author</a>
</div>
</div>
<divclass="panel panel-success">
<divclass="panel-body">
<ahref="http://www.deploypython.com/"><imgsrc="//static.fullstackpython.com/fsp-deployment-guide.png" alt="The Full Stack Python Guide to Deployments" width="100%"></a>
<pstyle="font-size: .8em; margin-top: 10px;">Searching for a complete, step-by-step deployment walkthrough? Learn more about <ahref="http://www.deploypython.com/">The Full Stack Python Guide to Deployments book</a>.