Setting Up Continuous Integration
By Adrian Sutton
I’ve spent a large chunk of this week investigating what the best way to set up continuous integration builds is for our product. Being a cross platform application we need a continuous integration set up that builds on four different OSs constantly (Windows, Mac OS X, Solaris and Linux). Ideally of course it would do so on all variants of those OSs and at some point that might be possible using vmware of some kind. For now though, just building and running the automated tests on some version of the OSs we support is a huge improvement. Fortunately, our build process already uses ant and requires just a single target be achieved.
I’ve previously tried setting this up using AntHill with no success. My mind is a little vague on the details of how it went wrong but it did go very, very wrong. I’ve also tried writing my own system with cron, scheduled tasks, shell scripting and ant and I think it’s still running but it doesn’t give any useful feedback so it’s as good as useless.
This time round I looked at hudson straight off the bat and found it couldn’t figure out CVS for a variety of reasons. I tried to investigate the problems a little further but couldn’t checkout the source code from CVS – most likely the server was having a bad day.
I looked at Damage Control and it’s releases seemed to have issues with files being missing (including the executable itself in one build).
Finally I tried CruiseControl despite the fact that I don’t like its design much. It appears to be working so I guess that’s what I’m going with. So far I’ve only got it running on Windows though I had it running on OS X for a bit. The next step will be to set it up dedicated build machines running the various OSs and get it running on that. Then I need to come up with a way to combine the results from each of the build servers into a single dashboard display so that the build results are more immediately obvious.
Once all that’s running I’m hoping it will be easy to add our other products into the build servers and having everything building away happily. Overall I’m amazed at how many problems I’ve had with the various continuous integration tools that are out there. I’m sure it shouldn’t be as difficult as it has been…
As an end to this rambling monologue – any recommendations of good resources for continuous integration, unit testing and general code quality improvement techniques? I’m thinking I should pick up a copy of “Pragmatic Project Automation” and probably also “Pragmatic Unit Testing”. Any others? Any other techniques I should be looking at either before, after or during the process of setting up continuous integration?