Cruise Control.NET

I was introduced to cruise the other day – and was very impressed by its power, as well ease of setup and use. Cruise control.NET is a build tool that polls a source repository (eg sourcesafe, cvs) for changes. If changes have been made, it performs specified operations (such as a Nant Build, calling of execuatables / batch files and emailing specified persons with the result of the build). It can also apply a label to a source tree.

Installation of cruise control is ridicuosly simple – you just run an installer, set up a config file (C:\Program Files\CruiseControl.NET\server\ccnet.config) and set the ccnet program / service running. The installer even sets up a web dashboard on your machine (provided you have iis installed) – usually at http://localhost/ccnet.

In my first experience with cruise, I set cruise control to poll a sourcesafe database every minute. If it detected a change in the source code (ie via a checkin etc) it called a nant build file (nant was also installed on my build server), before labelling sourcesafe and emailing relevant persons the results of builds (this includes and error generated by the nant build).

Note that when cruise control calls nant, it passed through parameters such as the label, status etc so you can run nant operations using these paramaters. See

Note that there is only one config file, but this can contain multiple projects. Also note that log files are stored at C:\Program Files\CruiseControl.NET\server\nameofproject\Artifacts\buildlogs

The only major thing I have struggled with, is trying to set the build number to increment from a certain value. Within the project state file (called nameofproject.state, located at C:\Program Files\CruiseControl.NET\server) – there is a node called LastSuccessfulIntegrationLabel. I altered this after stopping cruise control, but this did not seem to have any effect – the build number sequence still continued from where it previously was.

Example ccnet.config (so I remember!)

    <project  name="testproject">
            <intervalTrigger  seconds="60"  />
        <sourcecontrol  type="vss"  autoGetSource="true"  applyLabel="true">
            <executable>C:\Program  Files\Microsoft  Visual  Studio\VSS\win32\SS.EXE</executable>
            <exec  executable="C:\dosomething.bat"  />
                <executable>C:\Program  Files\NANT-0.85-RC2-BIN\nant-0.85-rc2\bin\nant.exe</executable>
                <email  from=""  mailhost=""  includeDetails="TRUE">
                        <user  name="developer"  group="developers"  address=""/>
                        <group  name="developers"  notification="always"/>

You May Also Like

About the Author: rnowik

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.