I was introduced to cruise control.net 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 control.net, 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 http://confluence.public.thoughtworks.org/display/CCNET/NAnt+Task
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!)
<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" />
<email from="firstname.lastname@example.org" mailhost="127.0.0.1" includeDetails="TRUE">
<user name="developer" group="developers" address="email@example.com"/>
<group name="developers" notification="always"/>