Daniel Hoelbling-Inzko talks about programming

Setting up Cruise Control .NET

Posted by Daniel Hölbling on June 5, 2008


Wow, what a day! After starting a new project today (I'll discuss that in another post) I decided that it is time to get serious with source control and continous integration. This time I thought I'd skip the java stuff and pass on JetBrains Teamcity, and instead went for the SourceControl.NET by ThoughtWorks that I heard of on Hanselminutes.

First things first: I am totally stunned of how great this has turned out. If you don't have a CI server yet, go get yourself one immediately. Even if you are programming by yourself, having someone run the build process and all unit tests for you never hurts and will save you time in the long run. Set-up of CruiseControl and the whole stuff was quite time-consuming (meaning 3 hours), but doing it on another project now really is a piece of cake, once you're done it feels quite natural.

So, to get started you should set up Subversion by simply installing VisualSVN, the server is running in less than 30 seconds, your users and repositories are in place after a mere minute. I can't think of any easier way to install Subversion, kudos to the VisualSVN team!

Now, this isn't quite standard, but really helps: Create a file called svn.bat in your C:\WINDOWS\system32\ folder with the following content:

@echo off
"C:\Programme\VisualSVN Server\bin\svn.exe" %*
Cool huh? Now you've got svn in your %PATH% without having to edit the variable itself. This will save you some time on the CCnet configuration.

The next thing was to install the newest CCnet version, and here I suggest you get the latest and hottest stuff directly from the svn. I ran into some troubles with some msbuild reports in version 1.3. Updating to 1.4 worked wonders.

Now that everything is set up (you can now access the WebDashboard through the http://<yourserver>/ccnet/ url), you need to get the whole thing configured. (The only painful thing in this installation).

A good starting point is the documentation that explains almost everything.

I won't go through everything in the ccnet.config file, just some things I want to point out:

  • Make sure to either run the latest CCnet build or use the doc that came with your binaries. New not used settings will stop the server from running.
  • While testing your build process go ahead and try to run the same commands from a shell. Especially with msbuild it took some time to sort out the quirks :)
  • Don't forget to blindly incorporate the whole list of <publishers>. I can't think of a scenario where I don't want almost all of those running, and if you skip some (like xmllogger and statistics) you will get some broken links on your dashboard.
  • VisualSVN sets up a https server. CCnet runs svn with the --non-interactive switch, so it will quietly break due to a unsigned SSL certificate. To bypass this simply run a svn list <repo> from a shell and accept the certificate permanently. And make sure the CCnet service is running under your login credentials, svn stores the certificate setting per user.
So, enough wisdom from my part on CCnet. I really had a blast in setting it up, and I can only recommend it. After the break I've postet my ccnet.config if you want to have a look.

      <project name="Valet">
        <sourcecontrol type="svn">
        <state type="state" />
        <labeller type="defaultlabeller">
          <intervalTrigger name="continuous" seconds="30" />
              <buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag</buildArgs>
            <nunit path="C:\Programme\NUnit 2.4.7\bin\nunit-console.exe">
          <xmllogger />
          <statistics />
          <modificationHistory  onlyLogWhenChangesFound="true" />
          <modificationWriter />
Man, I hate my blog theme. I need to get this thing wider sometimes soon!

Filed under net, programmierung
comments powered by Disqus

My Photography business


dynamic css for .NET