Posted 3 years ago
by albertoperdomo
Continuous deployment using cruisecontrol.rb and capistrano
It’s been a year or two since we have been using cruisecontrol.rb as a continuous integration server for our rails projects. We have also been using capistrano for some time to deploy our applications.
Lately i had been wanting to take it one step further and set up continuous deployment so i started looking for a ccrb plugin which supported deploying projects on successful builds using capistrano.
I ran into a small piece of code by Eric Lucas with the basic functionality for this purpose. I decided to try it out and it worked so i decided to build some more functionality into it.
The way it works right now:
- Settings per project: an array of stages you want to deploy to (if not set, it won’t try to deploy) and a list of emails addresses to notify if the deployment was successful or not
- If the build was successful it will try to deploy to all stages set in the options and will notify about success/failure
- It generates custom build artifacts cap_deploy_.txt with the output of the capistrano command so you can check what went wrong Some basic logging to the project_builder.

Notes