Jeff Hutton
Jeff Hutton

Reputation: 166

How do I set the path to the build.xml file in a Jenkins ant build from an environment variable on Windows

I am running an ant build in Windows from Jenkins and wish to pass the path to the build.xml file in an environment variable. I am using the envinject plugin to do so. I wish to set the variable on the project under "Prepare an environment for the run"->"Properties Content":

ANTBUILDDIR=C:\some\directory\here 

Then in the ant build properties I set:

"Build File": %ANTBUILDDIR%\build.xml 

Upvotes: 0

Views: 1886

Answers (1)

Jesse Glick
Jesse Glick

Reputation: 25471

Try $ANTBUILDDIR/TheBuildFile.xml as Jenkins configuration follows Unix shell variable expansion syntax.

Upvotes: 1

Related Questions