Title: Message Title
Aaron Marasco created an issue
Jenkins / JENKINS-51144
Parameters given to seed job via pipeline jobDsl don't show up as "Build Variables" in downstream's currentBuild.upstreamBuilds
Issue Type:
Bug
Assignee:
Daniel Spilker
Components:
job-dsl-plugin
Created:
2018-05-04 18:13
Environment:
EnvInject 2.1.5 Job DSL 1.69 Jenkins 2.107.2
Priority:
Major
Reporter:
Aaron Marasco
I have a pipeline that calls a job dsl that calls a pipeline. We'll call them "job1", "launcher", and "job2." The idea is that I can manually run "launcher" from the Jenkins GUI, or if somebody checked a box on "job1" then it will call the launcher for you. In the job1, I use:
jobDsl targets: "launcher_for_testing.groovy",
lookupStrategy: 'JENKINS_ROOT', // Default I think
additionalParameters: [
'GIT_SELECTED_BRANCH': BRANCH_NAME,
],
removedJobAction: 'DISABLE',
sandbox: true
In the launcher dsl script, I can access the "GIT_SELECTED_BRANCH" variable. If manually launched, it is a parameter of the job via the Jenkins GUI and everything is fine. If it is launched via job1, it works fine too, until... After it does a bunch of stuff to work around JENKINS-51038...
def my_job =