Playing with CruiseControl
February 15th, 2007 by HenPreviously I’ve grabbed CruiseControl to play with and had its unit tests fail to work on OS X. I seem to recall it only shipped as source, and seemed dead, so that was that as far as I was concerned. Moving on…
Recently I’ve been playing with it again because it still seems to be the only one out there that is comfortably beyond the basics and into the interesting stuff. This time I stuck it on a Linux laptop and failed tests are no longer a worry. I’ve immediately taken a liking to it, no matter what its clunkiness, because it uses configuration files to drive it and not a GUI on top of a database. Maybe this is passé in this World 2.0 day and age, but it works and follows the important keep it simple design principle. It also means I can generate files to save myself time.
So that was my solution to having lots of projects to build; I’ve made a template for m1, m2 and ant. Since then I’ve discovered plugins (basically macros), but they don’t seem to gain me that much given that I’m happily generating my config.xml from a much smaller file. The other major aim I wanted to have was to build under multiple JVMs. I’ve done that via a generic ‘run foo under all configured JDKs’ script that you symlink next to the foo script in question. It works happily enough, but I don’t think I’m getting the pass/fail logic right.
Next up I had a play with the reporting package. This is basic and dull. Some attempts have been made to add new graphs etc, but they’re missing out by not adding in better automatic m1/m2 functionality. M2 is supposed to allow me to have two different sites, so I’m looking forward to trying to define a user focused site and a CI focused site. Then I’ll have to figure out how to turn off the useless Coding Violations pie-chart in CruiseControl.
One thing does piss me off something royal. CruiseControl seems to refuse to want to be in control of doing the svn update. It can check to see if there’s been a change, but it won’t go ahead and do the update. That’s incredibly crap, and as the new tag to chain builders together isn’t working for me currently, I either have to make maven do the update [doesn’t help the ant file], or write a wrapper ant task around each bit [dumb], or hack it into the scripts themselves (ant, maven, mvn). The latter is tempting.
CruiseControl seems to suffer from a similar problem to PMD and its ilk. The tool should not impact the target. My build should have no special tasks for the CI system, and my source should have no special flags and comments for the reporting tool. Otherwise the tail is shafting the dog.
I’ll probably keep on pushing on with CruiseControl. I trust a system that is based on configuration files and not a webapp with a database behind it. The state data should be in a database, with CruiseControl it’s just on the file system; but the configuration is more important than the state.

February 15th, 2007 at 3:45 pm
“CruiseControl seems to refuse to want to be in control of doing the svn update. It can check to see if there’s been a change, but it won’t go ahead and do the update.”
Is this just a bug with the svn bootstrapper? I’ve never had a problem with cruisecontrol updating an entire project from cvs.