Updating Our Build Process

posted on 2005-03-31 at 00:41:59 by Joel Ross

Craig Andera has a nice post about building applications, pointing out that you're never building just one.

He says that while the goal is to build an application, you have to build auxilary apps to go with it. You need to have tests, a build process, and a way to deploy the application.

I was reminded of this today. We went live today (I'm waiting for the official word to make it's rounds before I let the cat out of the bag on what I've been working on), so today was spent revamping our build process. We use Nant to do our builds, usually through CruiseControl. But when we want a to do a release build to our test environment, it's done using just Nant. To get us by while in crunch mode, we got something up and running, but it wasn't optimal.

With the site live, it was time to fix that. So today, I spent some time in our build files. The end result? First, I got intellisense working in the build files, using this post from Peter Marshall. Now, can you get both nant intellisense and nantcontrib intellisense at the same time?

Next, when we want to build to production, it's as simple as running one command. That command does the following steps:

  • Stops the CruiseControl.NET service (this prevents builds from interfering with our prod build)
  • Cleans both the dev and test directories
  • Gets the latest into the dev directories
  • Builds in release mode
  • Copies files into the test directories
  • Zips up the builds so they can be copied up to the production servers
  • Optionally, it labels VSS with a command line specified label.
  • Starts the CruiseControl.NET service again.

I also made it so each developer can have their own properties file that defines certain properties needed by Nant to do the build. What does that do? Now, every developer can run Nant locally to do the build, something we didn't have until now.

I also added the ability to specify a label to build. So I can specify a label two or three versions ago, and be able to build that automatically. Now, we can go back and build our Alpha build from five months ago, and see how far we've come since then.

Overall, I'm pretty happy with the build as it stands right now. If anyone wants to see a sample build file doing the things listed above, let me know. I can post that if there's enough interest.

Categories: Development