[Anthill-pro] Project-wide environment variables

Chad Loder anthill at loder.us
Fri Feb 2 18:14:55 CST 2007


Hello.

Our existing build system uses a collection of ant scripts to do its work. We
have a couple of environment variables that are required to be set when building
the code. These variables are used by the ant scripts to find the root of the
source tree and to find various other configuration files.

Currently, in each 'Ant' job step in Anthill pro, we have to include the following
environment variable definitions:

FOO_ROOT=${anthill3/work.dir}/projects/${bsh:PathHelper.makeSafe(ProjectLookup.getCurrent().getName())}/foo
TOOLS=${anthill3/work.dir}/projects/${bsh:PathHelper.makeSafe(ProjectLookup.getCurrent().getName())}/foo/tools

The ant scripts then refer to ${FOO_ROOT}/src, etc. to find things. Most of the ant scripts have to
be run from the ${FOO_ROOT}/src directory, which means that before each 'Ant' job step, we have to
insert a 'Set working directory' script that uses the value of:

${anthill3/work.dir}/projects/${bsh:PathHelper.makeSafe(ProjectLookup.getCurrent().getName())}/foo/src


Is there a way to specify these agent-relative variable values at a higher
level in the project definition so that we don't have to include them in each
step?

Thanks,
	c





More information about the Anthill-pro mailing list