0
votes

I have a jenkins job that runs an ant target it's build. During this build process within ant, we get annotated tags and create file names based on those tag names.

I'd like to be able to use those tag names during the post-build process as well for creating folders on a shared drive with the same names.

I can't for the life of me figure out how to create variables in jenkins from my ant build that can then be used within the post-build section of jenkins.

I don't mind writing those variables to a file from ANT if I am unable to set them directly from ANT but am able to do it as a second build task using that written file through shell/batch scripts. I still just don't know how to "set" variables that jenkins can use later in that post-build section.

Is this possible?

Kyle

1

1 Answers

0
votes

I was able to solve this by writing a file to disk from my ANT build

I then used the Jenkins EnvInject plug-in to load that file in the same Jenkins project. The variables were then available for the post-build actions