Thursday, July 29, 2004

Build it

While I've been doing this documentation and modeling I've been making some decisions about putting in place a build process. Central to this process will be FinalBuilder an automated build tool that I purchased recently. FinalBuilder has a graphical interface unlike open source tools like Ant which require you to write a build script by hand so to speak. It's very highly regarded and has been given great reviews by Joel Spolsky on his website and Mike Gunderloy in his recent book Coder to Developer.

I've only just started using FinalBuilder but already I've been able to make quite a sophisticated build script. The list of third party tools that FinalBuilder can automate is impressive and quite fortuitously everything I use is on that list.

Up until now I haven't really had call for an automated build routine and release management. All the software I've written for clients has been custom software where the latest release is the only version in use at any one time. My build routines have been manual processes since they involved only a few steps and weren't repeated very often.

Sydney will be a different kettle of fish to what I'm used to in this area. As soon as I release the slightest update to the originally shipping software I'm going to have to deal with release management issues. Two references I've found especially helpful in preparing the early fundamentals to support this are Luke Hohmann's Beyond Software Development which includes a great chapter on release management and Coder to Developer which I mentioned earlier and has extensive notes on version control and automated builds.

A goal I've set myself as part of my release management strategies is to be able to reproduce an exact replica of any build that I have previously publicly released. Being able to do this will mean that I'll be able to properly investigate bug reports for earlier versions, and then confirm whether or not the bug exists in the latest version.

If I use my main development machine to build these public releases as soon as I upgrade a third party library or update my compiler it won't be possible to reproduce the exact same version any more. I might be able to retrieve my code as it was for a prior version but there will be subtle (or perhaps not so subtle) differences in behaviour caused by the changes in library and compiler versions.

Some people get around this by storing everything in their version control system, third party libraries and even tools and compilers. I considered this approach but but decided against it. The time required to prepare, test and maintain such a setup would be too great to justify this approach.

What I decided to do instead was to continue to do my day to day development using my regular development machine but to compile all my release builds on a dedicated build server. By using a dedicated build server I can configure and reconfigure it as required to match a particular release without interfering with my development machine.

Build servers aren't anything out of the ordinary but my build server is a little different in that it's actually a VMWare virtual machine rather than a physical machine. On that VM I have installed Win2k, Delphi, StarTeam version control, Help and Manual and Finalbuilder.

I won't be doing any developing in that build server virtual machine. Rather when I want to produce a build I will load the VM and use FinalBuilder to retrieve the latest source code from Starteam. FinalBuilder will then build the project, run unit tests, create an install file and upload the new version to my website.

After I build and release a new version I'll then copy the whole VM file to a DVD and file it away. If at any point I need to rebuild a past version, I'll go to my archive of build server DVDs, copy the VM file back to my machine, and then use the exact same build server that built the original to rebuild the release. This way I won't have to worry about maintaining third party code in Starteam or manually setting up different versions of third party libraries.

So I now have my first build server VM up and running ready for the first public release of Sydney. When will that be? I'm not too sure but let's just say there's plenty of time to refine my FinalBuilder script between now and then.

0 Comments:

Post a Comment

<< Home