public
Description: A lightweight, Continuous Integration tool written in Ruby
Home | Edit | New

Usage Tutorial

As an example on how to use Cerberus, we will follow through the steps of using CI to build another one of my projects, BBRuby.

First we must install the gem.

$ sudo gem install cerberus

First off, let’s edit our Cerberus config file and set some defaults for all our projects

$ vim ~/.cerberus/config.yml

Personally, I want all my projects to send alerts via email and twitter, so this is what my config.yml looks like

publisher:
  active: mail twitter
  mail:
    address:  smtp.myserver.com
    port: 587
    domain: mydomain.com
    authentication: plain
    user_name: myemail@mydomain.com
    password: mypassword
  twitter:
    login: twitter_login
    password: twitter_password

Next, we will add BBRuby to the Cerberus projects list

$ cerberus add git://github.com/cpjolicoeur/bb-ruby.git SCM=git RECIPIENTS=cpjolicoeur@gmail.com

As a check, I’m going to check out the project config file as well to make sure everything looks good

$ vim ~/.cerberus/config/bb-ruby.yml

Here are the contents of my bb-ruby.yml

publisher:
  mail:
    recipients: email@test.com
scm:
  type: git
  url: git://github.com/cpjolicoeur/bb-ruby.git

Everything appears to be configured properly, so let’s go ahead and run Cerberus for the first time:

$ cerberus build bb-ruby

The very first time cerberus is run on a new project, all the publishers will receive an alert letting you know the project was setup successfully. (output will resemble the following)

[bbruby] Cerberus set up for project (#b32d271a0dfd38dcbd9799f035ac494f757d4506)

Subsequent builds of cerberus will deliver an error alert if the build is broken

[bbruby] Build broken by Craig P Jolicoeur (cpjolicoeur@gmail.com) (#15ad949b6cb7ca29996dd333b94f6c97e1018b16)

Other types of alerts will let you know if the build is still broken but getting better or getting worse, or if the build was fixed and is now successful. Once the project is successfully built, you will only receive alerts once the build breaks again. If the repository stays in successful build condition, cerberus does not alert you ever time to let you know everything is still OK.

Last edited by cpjolicoeur, Mon May 25 14:44:46 -0700 2009
Home | Edit | New
Versions: