September 21, 2011

Build Farm Anthill Agent Variable Utilization

Build Farm Anthill Agent Variable Usage.

For your build farm Anthill agents, creating agent variables for use at build time can help you to manage different versions of installed software and to make sure that your builds are using the version that you intend.

Do This:
Prefer to use agent variables with the major version in the name of the agent and do not include the minor version.  For example, for Java 1.6 builds, prefer the agent variable name JAVA16_HOME over the name JAVE16026_HOME.




An advantage of this is that future builds will automatically take advantage of JAVA 1.6 bugfix/security upgrades on your build farm machine.  One potential but rare pitfall is that a build that you created in the past is no longer easily reproducible (binary compatible) since the underlying compiler has changed.  To reproduce would involve determining exactly which version of the JDK that was originally used and then configure the Anthill build job to use that original JDK.

Don't Do This:
Do not use Agent variable names that are too generic, especially if you have more than one version of software installed on a build farm machine.  If you define an agent variable named JAVA_HOME, then someone is going to use it.  As your build farm is maintained, a newer major version might be installed and JAVA_HOME might be reset to this new version.  You may not discover until deploy time that the web container does not support that new version.  If you have the major part of the version number in the agent variable name, then it will be clear exactly what version of the software your application is using rather than having to guess when you see "JAVA_HOME" in the Ant Builder step.

Eric Starr http://anthillizer.com

0 comments:

Post a Comment