capistrano + jenkins

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.

Example usage:

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
Advertisements
Tagged with: , , , , ,
Posted in capistrano, hudson, jenkins, ruby, rubygem

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: