How do i pass a build number from an upstream job to a downstream job using the build pipeline plugin

69 views
Skip to first unread message

Eric Wood

unread,
Jul 31, 2015, 11:05:45 AM7/31/15
to Jenkins Users
I have an upstream job that uses the version number plugin to set a build environment variable to something like: 1.0.0.2

I use the Build Pipeline plugin to trigger a downstream job manually and I want to pass this value down the pipeline to use.  I cannot use the parameterized build trigger plugin with the build pipeline plugin ... at least as far as I can see.

How can I pass the build version number from an upstream job to a downstream job?

Thanks?

Khai Do

unread,
Aug 1, 2015, 1:16:47 PM8/1/15
to Jenkins Users
How about save environment variable out to file then use env inject plugin to load it in downstream jenvironment

mr

unread,
Aug 3, 2015, 4:50:26 AM8/3/15
to Jenkins Users, eric...@rocketmail.com
If I do understand your question correctly, then you could use a build call within the build pipeline like this one:

        build(downstreamJobName,
              VERSION: '1.0.0.2
             )

Provided that the job with the name 'downstreamJobName' accepts a parameter with the name 'VERSION'.
Reply all
Reply to author
Forward
0 new messages