Yet another ruby gem: jenkins_cap
This one allows you to tie your Capistrano deployment to your Jenkins build, such that a deployment only occurs if the revision (SVN) has been successfully built on Jenkins. The gem pulls data from Jenkin’s JSON API via wget. (TODO: Use Ruby to make the API request).
To add it to you deployment just specific your Jenkins host url, and the name of you Jenkin’s build. Then add the “jenkins_cap:build_check” to one of your Capistrano hook.
set :jenkins_host, "http://jenkins.example.com" set :jenkins_job_name, "mybuild" before 'deploy', 'jenkins_cap:build_check' # check if the revision has been built by Jenkins successfully