Builds

As part of our commitment to Continuous Integration1, we configure an automated build for each of the products and code libraries that we release or ship.

There are many ways to script an automated build, we currently use a mixture of ANT2, Grunt3 and in some cases Make4. Sometimes the selection of tool is driven by our preference and experiences, at other times it is driven by the kind of project we are working on. For example we use Maven5 for building some of our Java projects because it’s the most appropriate tool.

Build Steps

Irrespective of which tool you select, as a minimum an automated build should:

Build script common targets

Both ANT and Grunt allow you to create named targets or tasks, and both allow us to create meta tasks i.e a task which is a wrapper for calls to a set of other tasks. So irrespective of which build tool is used we can maintain a common interface for our build scripts.

Here are the common targets all builds should expose:

Distributions

An important responsibility of the automated build is to produce the distribution. The only requirement for using it should be to unpack it onto an environment provisioned to run it. A distribution should: