Campfire Notifier Plugin for CruiseControl.rb
Thoughtworks produced a piece of software called CruiseControl.rb (“CC.rb”) that acts as a continuous integration service, essentially running a “build” or your test suite for your Ruby projects.
Campfire is a group chat service from 37signals that many companies use for collaboration among their team members.
This plugin will post notifications to a Campfire room when a build on CC.rb finishes. By default, it will alert the room when a build is: FIXED (was previously failing, now passing), BROKEN (was previously passing, now failing), SUCCESS and FAILED.
Getting the Software
Clone this repo into a suitable directory:
$ cd ~ $ git clone git://github.com/h3h/cruisecontrolrb-campfire_notifier.git $ cd cruisecontrolrb-campfire_notifier
Install bundler if you don't already have it
(You shouldn't need to use
sudo when installing your gems):
$ gem install bundler
Install all of the gems required for this library:
$ bundle install
Make sure the tests pass:
Installing the Plugin
$CRUISE_HOME/builder_plugins directory (usually
~/.cruise/builder_plugins), then symlink to
$ cd ~/.cruise/builder_plugins $ ln -s ~/cruisecontrolrb-campfire_notifier/lib/campfire_notifier.rb
You should end up with something like:
# cd ~/.cruise $ tree -L 2 . |-- builder_plugins | `-- campfire_notifier.rb -> /Users/brad/cruisecontrolrb-campfire_notifier/lib/campfire_notifier.rb |-- data.version |-- projects | `-- myproject |-- site.css `-- site_config.rb
Inside each of your project directories (
you'll find a
cruise_config.rb file. For each project that you want to
set up to notify Campfire, configure it with the following:
Project.configure do |project| project.campfire_notifier.account = 'myaccount' project.campfire_notifier.token = 'secret' project.campfire_notifier.room = 'Builds' # Optional: project.campfire_notifier.ssl = true project.campfire_notifier.trac_url = '***/trac/***/changeset' project.campfire_notifier.broken_image = 'http://***/sad.png' project.campfire_notifier.fixed_image = 'http://***/happy.png' project.campfire_notifier.only_failed_builds = true project.campfire_notifier.only_fixed_and_broken_builds = true end
These configuration options should be pretty self-explanatory.
$ gem install rcov $ rake rcov