Write files with the desired parameters in the "build" job, archive the
files, and unarchive them in the downstream job. Then you can read the
parameters stored in the file. Here's a sketch how we do it:
In the upstream job:
def downstreamParams = [:]
downstreamParams.foo = 'bar'
downstreamParams.bar = 'foo'
writeFile file: 'my.params', text: downstreamParams.inspect()
archiveArtifacts artifacts: "*.params"
And in the downstream job:
step([$class: 'CopyArtifact', filter: '*.params', projectName:
'upstream-project',
selector: [$class: 'TriggeredBuildSelector', fallbackToLastSuccessful:
true], target: ''])
def upstreamParams = Eval.me(readFile(file: 'my.params'))
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/dda635c1-7e0d-485d-8d1d-064d90cf7c37%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.