Is it possible to pass data from downstream job to it's parent job?

9 views
Skip to first unread message

Danny Rehelis

unread,
Jun 23, 2017, 3:32:33 PM6/23/17
to Jenkins Users
Lets say I execute downstream job -
stage ('Starting test job') {
    build job: 'RunTestJob', parameters: [[$class: 'StringParameterValue', name: 'aaa', value: aaa]]
}
Is it possible pass environment vars or any other vars I set in downstream job back to its parent?

Richard Ginga

unread,
Jun 23, 2017, 3:38:44 PM6/23/17
to jenkins...@googlegroups.com
if you code it like this:

stage ('Starting test job') {

    buildobj = build job: 'RunTestJob', parameters: [[$class: 'StringParameterValue', name: 'aaa', value: aaa]]
}
you might get something useful back by doing this: (i have not tried it)

buildobj.getBuildVariables()

available methods for buildobj can be found here:


--
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAObRFCW5uPVjEGMLtvBdS4UzaKW%3Dc2m%3DUfM%2BeHrzDWMZcEgAJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Dick Ginga
Build Engineer

Reply all
Reply to author
Forward
0 new messages