Thursday 15 August 2013

Retrieval of Jenkins environment variables while invoking ANT -



Retrieval of Jenkins environment variables while invoking ANT -

i invoking windows batch command jenkins, after latest version of project svn. windows batch command performs file copying, after files retrieved svn , runs ant build. in ant build process, generating jsp file have tried capture in next fashion.

%build_tag%-%build_number%-%build_id%-%svn_revision%

unfortunately none of info understood build process , writes %build_tag%-%build_number%-%build_id%-%svn_revision% file.

could please allow me know if there way capture these info file in way trying do? if not, direct me on how these info captured jsp file during process following?

build_tag, svn_revision, etc environment variables nowadays during jenkins build, , utilize them in ant, utilize them other environment variable ant

first, add together line: <property environment="env"/> can reference environment variable prefix, like: ${env.var_name}

so in case, you'd do:

${env.build_tag}-${env.build_number}-${env.build_id}-${env.svn_revision}

ant jenkins

No comments:

Post a Comment