I use the build pipeline to manage a series of related jobs (downstream). I want to be able to pass the build number from the upstream job to be used in the downstream jobs as the build number there. How is this best accomplished.Thanks, Eric
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
echo **** Keep build numbers in pipeline consistent ******
"C:\Program Files (x86)\Curl\curl.exe" -d "nextBuildNumber=%BUILD_NUMBER%" http://user:password@localhost:8080/job/DOWNSTREAM_JOB1/nextbuildnumber/submit
"C:\Program Files (x86)\Curl\curl.exe" -d "nextBuildNumber=%BUILD_NUMBER%" http://user:password@localhost:8080/job/DOWNSTREAM_JOB2/nextbuildnumber/submit
This uses the nextbuildnumber plugin.
[a different] Chris Williams
Dell | PG Release Engineering
I use the ParameterizedTriggerPlugin to pass various properties, including build name/number, to downstream jobs. In the upstream job, I have a build step to write the properties to a properties file in the workspace. Then, using the plugin’s “Trigger parameterized build on other projects” task, I specify the downstream project and specify the properties file in the “Parameters from properties file” field.
Then, in the downstream job configuration, select “This build is parameterized” and create a “string parameter” for each of the desired properties from the properties file you created in the upstream job.
-Jeff Ng