Reputation: 2277
I have a Jenkins job which triggers a parametrized build of another job on completion. This is setup using the Parameterized Trigger Plugin. It is working, and triggering the job correctly. https://wiki.jenkins.io/display/JENKINS/Parameterized+Trigger+Plugin
I would like to be able to pass in the build status of the first Jenkins job to the second job. (It is literally just a string that is used, so there is no value in creating a second downstream job and triggering the other one if the job Failed.)
How do I pass the build status to the downstream job?
I've tried using BUILD_STATUS=${BUILD_STATUS}
in the predefined parameter to pass into the next job. But this passed in an empty string.
Upvotes: 0
Views: 1576
Reputation: 2277
For a workaround, I have triggered two Parameterized builds, both triggering the same job. The first one is on Success, the second on Failure, and these pass in a parameter (success/failure) to the job based on that trigger.
Upvotes: 1