Cerberus

Cerberus is a lightweight and easy-to-use Continuous Builder software for Ruby. It could be run periodically from a scheduler and check if application tests are broken. In case of failed tests Cerberus sends notification to developers.

Cerberus works perfectly both on Windows and *nix platforms and supports popular version control systems like Subversion, Git, Mercurial, Bazaar, Darcs and Perforce. It also has many ways in publishing build results such as e-mail, jabber, Twitter, Campfire, IRC and RSS files.

Cerberus requires:

  • ruby - 1.8.2 or higher

Optional requirements:

What does ‘Cerberus’ name mean?

Quote from Wikipedia

Cerberus or Kerberos (Kerberos, demon of the pit), was the hound of Hades-a monstrous three-headed dog with a snake for a tail and innumerable snake heads on his back. He guarded the gate to Hades (the Greek underworld) and ensured that the dead could not leave and the living could not enter. His brother was Orthrus. He is the offspring of Echidna and Typhon.

Cerberus image

So Ruby Cerberus tool (like his ancestor) will guard your application tests and won’t let your project go to the world of dead projects.

There are several solutions already present, why do you need to use Cerberus?

Main advantages of Cerberus over other solutions:

  • Cerberus could be installed on any machine, not only where SVN repository is located.
  • Cerberus works not only for Rails projects, but also for any other Ruby projects (more precisely, for all projects using Rake).
  • Cerberus is multiplatform solution: it runs great on *nix and Windows.
  • Cerberus is distributed via RubyGems, so it is very easy to install and update to the latest available version.
  • Cerberus is very easy to start using. Just type cerberus add PROJECT_URL|PROJECT_DIR.
  • Cerberus is a lightweight solution: most of the time Ruby process will not even run. Cerberus runs rake only in case of changes are found in the project.

It is very easy to use Cerberus. First install it. Using RubyGems package manager is the easiest way to do it.

gem install cerberus --include-dependencies

or just get Cerberus distribution package right from the download page

Then you need to add project which will be watched by Cerberus. Do it by

cerberus add (DIR|SVN_URL) APPLICATION_NAME=some_app RECIPIENTS=dev1@project.com

as a second parameter you could pass URL to subversion repository or directory with working SVN folder.

Go to ~/.cerberus and edit config.yml file (only once after installing Cerberus). Enter your configuration options here like email server, password, user_name and other options. See ActiveMailer description for more - Cerberus uses it as default notification layer.

Here is an example of configuration file

publisher:
  mail:
    address: smtp.gmail.com
    port: 587
    domain: gmail.com
    authentication: plain
    user_name: someuser
    password: somemail

Also check ~/.cerberus/config/<APPLICATION_NAME>.yml and make sure your options are correct.

Then run Cerberus for the project:

cerberus build APPLICATION_NAME

or build all registered projects:

cerberus buildall

Cerberus will check out latest sources and run tests for your application. If tests are broken, recipients will receive notifications.

But of course it is better to run Cerberus automatically i.e. from Cron, say, every 10 minutes.

Also, if you have the option of installing your own software where the Subversion server is located then it is better to run cerberus from Subversion hook. In this case Cerberus would run right after commit without any delays!

Now you can see that to setup Cerberus is a very easy thing to do - no need for long manuals and costly training, no consultants whatsoever or weeks of setting up the software. Cerberus - Just Use It!©