CruiseControl.rb – Continuous Integration, the Ruby way

Once again, Ruby is revealing itself as a delivery tool. This time in the form of CruiseControl.rb – ruby continuous integration tool/application.

CruiseControl.rb was the topic for this month’s Calgary Ruby Users Group (CRUSERS) meeting. Accorindg to core-contributor Alexey Verkhovsky, from Thoughworks (Calgary), it’s an ‘incarnation’ [A carefully chosen word, over ‘port’] of Cruise Control (the famous continuous integration tool in Java).

The session was a light-hearted one, probably matching the spirit that lead to CruiseControl.rb.

  • Java Cruise Control:
  • History.
  • Shortcomings (setup, Ruby integration).
  • Other “Basic’ CI tools (Cerberus, CIA or continuous Builder Plugin by DHH).
  • CruiseControl.rb features:
  • Lightweight.
  • Easy Setup (No DB setup even).
  • Email, CCTray, Jabber (plug-in), RSS notifications.
  • Plugin architecture (for the lava lamp enthusiasts).
  • Configurations (if needed), are in Ruby.
  • Setup:
  • Extract the compressed file
  • Dashboard Rails application (for monitoring).
  • Scripts (cruise) for adding/removing project, starting/stopping the daemon (builder) script.
  • Add a project (cruise add <project_name> –url file:///path/to/svn/repo/project)
  • Start the Dashboard rails application.
  • Enjoy.
  • How it works:
  • The builder (deamon) script polls the SVN repo for change.
    When change is found; CruiseControl.rb updates a copy of the project, then invokes the project Rake file tasks. The priority is a ‘cruise’ task, db:test:purge, db:migrate, test or then the ‘default’ task (check cc_build.rake)
  • Custom Configurations:
  • Custom configurations can be done through cruise_config.rb in your project directory.
  • Example:
    ` Project.configure do|project| project.scheduler.polling_interval = 10 end`
  • CruiseControl shortcomings (opinionated features?)
  • SVN only (so far)
  • Can’t detect build results ran from outside the Dashboard (ran from the console).
  • Ruby projects only (but theoretically can be hooked to other projets).
  • SVN externals not handled.
  • Coming Soon:
  • Dependency builds
  • How to contribute:
  • TRY IT OUT!
  • Propose features/bugs/patches/… you know.
  • Cool things to try:
  • You have access (from the dashboard) to the failure/error-causing line (hyperlinked tothe file, with the line highlighted)
  • Text/HTML files placed in CC-BUILD_ARTIFACTS are picked up by CruiseControl.rb and hyperlinked on the specific project dashboard page (check: http://cruisecontrolrb.thoughtworks.com/builds/CruiseControl right side links for test coverage /rcov files)
  • Some ‘hidden’ links:
  • Documentations.
  • Manual.
  • Screencast.
  • Download.

Quite a nice and light tool that definitely has a market (at least I know I am going to use it).

Dang: Alex was the lucky one winning ‘Rails Cookbook’ ruffle – and yes – he knows Rails enough to pass it to a friend 🙂