Setting up GForge's CruiseControl? integration
CruiseControl? is a framework for continuous build process. The integration with GForge AS includes real-time build status for and automatic opening of bug tickets, and it’s accomplished by installing a GForge Publisher Plugin in the build machine. CruiseControl? integration for GForge AS is based on the creation of “Build Configurations”. Each “Configuration” is a simple set of rules that will be applied when that particular “Build” fails. Basically, a new Tracker Item is created on the selected Tracker, by the selected Submitter, and is assigned to the selected Assignees.
Setting up the CruiseControl?.NET extension
In order to configure the extension, all you need to do is copy the provided .DLL files to your CruiseControl?.NET server installation directory (typically C:\Program Files\$$%%$$.NET\server).
Setting up the GForge server
First, we must configure GForge’s CruiseControl? plugin for CruiseControl? integration. The CruiseControl? plugin is part of the distribution of GForge Advanced Server, and it can be easily set up in these steps:
- Log into the GForge server as the root user and create the directory /etc/gforge/plugins/cruisecontrol:
# mkdir /etc/gforge/plugins/cruisecontrol
- Copy the file /opt/gforge5/plugins/cruisecontrol/conf/cruisecontrol.conf to /etc/gforge/plugins/cruisecontrol:
# cp /opt/gforge5/plugins/cruisecontrol/conf/cruisecontrol.conf /etc/gforge5/plugins/cruisecontrol
- Edit the new copy of cruisecontrol.conf so that the “hash” variable has a random string of characters of any length which will be used for authentication (this is randomly done at install time, but you can change it if you want). A minimum of 20 characters is recommended. The file should look like this:
<?php
$config'hash' = '2bYcZFPcTaqaZBhaCLFPgkk7aBK19Xk09im8XbjQ'; // Change this to a random string
?>
- Re-generate GForge’s configuration cache:
# /opt/gforge5/bin/create_config_cache.php
Setting up the GForge project
To enable CruiseControl? support for a GForge project, go to the project’s admin page and enable the CruiseControl? checkbox on the “Plugin Admin” box. Click “Submit” to activate the plugin. When the plugin is activated, a new option, “CruiseControl? Admin” will show up on the project’s Admin page. From this page, you can create new CruiseControl? configurations for the project.
A CruiseControl? configuration lets you configure what action to take if a build fails. When this happens, a new tracker item is automatically opened on the specified tracker, and it is assigned to the users you select.
Setting up a configuration
Once you’ve created a configuration, you’ll have to configure the CruiseControl? client to interact with this configuration. On the CruiseControl? Admin page, you’ll see the list of the configurations, and next to each configuration you’ll find the option to download either the Java config (for the Java version of CruiseControl?) or .NET config (for CruiseControl?.NET).
Setting up CruiseControl?.NET
Go to the CruiseControl?.NET\server directory and open the file “ccnet.config” on your editor. Then, on the GForge admin page, click on the “Get .NET Config” link for the configuration. You will be directed to a page with one text box which contains the XML entries to paste on the configuration file.