Reputation: 627
I'm using multiphase job in Jenkins to do the following:
I need to copy the artifact in AUTOMATE from a specific build in Step-2 BUILD. However, the BUILD_NUMBER for step-1 PULL and step-2 BUILD isn't same and afaik, artifacts are stored specific to build number.
Not sure how I can pass the BUILD_NUMBER from step-2 to step-3, as using 'current build parameters' doesn't bring in step-2 params to step-3.
I can't use 'Last Successful Build' as later i'll be running multiple jobs simultaneously on multiple instances.
I've and idea of storing the param in a file and read from there. But, i feel it more expensive and complex, and looking for a simpler alternative. Any ideas/help is appreciated.
Upvotes: 0
Views: 488
Reputation: 2045
@kaur,
Use the Jenkins Promoted Build Plugin to save the build.
It gives you several env variables to work with:
Hope that helps.
Upvotes: 1