If you visit regularly, you may be forgiven for not realising that I actually have a day job. By night (and sometimes for a few minutes here and there during the day) I am a crazy gadget freak, by day I am a mild-mannered software developer. I’m particularly mild-mannered at the moment, because I’ve just got CruiseControl.NET (CC.NET for brevity) up and running on our brand new (recycled) build server.
CC.NET is a nice little app that integrates the process of building source files (either via Nant or MS Visual Studio), running tests (Nunit), and reporting results. It can communicate with most source control systems, and will happily retrieve all the source, compile, test, label, and send you a smarmy little email saying “whoever checked in that new data access routine has just royally buggered the build”, or words to that effect.
In our particular example, we’ve configured CC.NET to monitor our Visual Sourcesafe project at 30 minute intervals. Developers can work away on their own copy of the project, making changes, compiling locally and running tests. When they check in any changes to Sourcesafe, CC.NET will (on its next poll interval), see those updates and run a build of the whole system. Here’s an example of the CC.NET config to do a nant build (we added a special ‘cruisecontrol’ target to the nant script that does a complete release build):
<build type="nant"> <executable>nant.exe</executable> <basedirectory>C:/testproject</basedirectory> <buildfile>testproject.build</buildfile> <targetlist> <target>cruisecontrol</target> </targetlist> <buildtimeoutseconds>300</buildtimeoutseconds> </build>
CC.NET hums away day and night, busily building our project whenever it feels the need. The only intervention that is required is to update the CC.NET configuration file if any new outputs are added to the build (e.g. a new project is added that creates a new dll). This is because the current nunit task does not allow wildcards:
<tasks> <nunit> <path>C:/Program Files/NUnit 2.2/bin/nunit-console.exe</path> <assemblies> <assembly>C:/testproject/build/HelloWorld.dll</assembly> <assembly>C:/testproject/build/HelloWorldClient.exe</assembly> </assemblies> </nunit> </tasks>
Given that CC.NET is only at version 0.7, I’m hoping that wildcards will be a feature of 1.0 (or else I might just add the feature myself…).