Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I stop Chef from deploying code with failing tests?
    primarykey
    data
    text
    <p>I've been ramping up on Chef over the last week and preparing (emotionally and operationally) to cease our use of Capistrano. (We're hosting a Rails app.)</p> <p>We follow the GitHub flow, meaning we just have master and a panoply of feature branches. Right now we use Jenkins for continuous integration and continuous deployment, and we use Capistrano to deploy <code>master</code> to our servers - but only after our unit, integration, and acceptance tests pass. </p> <p>I'm using Chef's <code>deploy_revision</code> resource, and I'm thrilled at how well it's working. I'm eager to go from "push" to "pull". But I don't want to deploy code unless our tests have passed. I'm stuck on the choice between alternative approaches to achieving that effect:</p> <ol> <li>Point Chef at a tag (e.g. <code>2.0</code>) and periodically updating that tag in our deployment recipes. (I don't like this because it isn't really continuous deployment. We are now back to hand-holding our code every time we want to release it.)</li> <li>Point Chef at a branch, have Jenkins merge <code>master -&gt; release</code> after the test suite passes. (I don't like this because now my Jenkins server has read/write access to my repository.)</li> <li>Don't configure Chef to run periodically, and instead have Jenkins run <code>chef-client</code> over SSH. (I don't like this because I was looking forward to a day when our Jenkins machine no longer had SSH access to our servers.)</li> <li>Deploy the code, but revert the commit if a test fails afterwards. (Too error-prone, in my view.)</li> </ol> <p>I do think I've done enough homework already. I've been following <a href="http://tech.hulu.com/blog/2012/07/06/automating-system-provisioning-and-application-deployment-with-chef/" rel="nofollow">Steve Jang's thorough write-up</a>, among others, and have spent hours of time on the <a href="http://docs.opscode.com" rel="nofollow">Chef docs</a>. But in all the excellent community tutorials on continuous deployment with Chef, I don't see any mention of this particular use case.</p> <p>I could live with most of the options above, but I'd feel better if I knew it was a proven approach. I'm sure other organizations out there have solved this already. How did you do it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload