-
Bug
-
Resolution: Not A Defect
-
Major
Given two basic Jenkins Pipelines:
//Pipeline 'a'
stage 'stage' node{ build 'b' step([$class: 'CopyArtifact', projectName: 'b', selector: [$class: 'DownstreamBuildSelector', upstreamBuildNumber: env.BUILD_NUMBER, upstreamProjectName: env.JOB_NAME]]) }
//Pipeline 'b'
stage 'stage' node{ writeFile file: 'target/b.txt', text: 'b' archive includes:'target/b.txt' }
Copy artifact cannot find the right build from the Pipeline, consistently returning:
ERROR: Unable to find a build for artifact copy from: b
Finished: FAILURE
It doesn't work when removing the env.XYZ variables and passing in hard-coded values either.
- depends on
-
JENKINS-29913 Generalize DependencyGraph to Job (or ParameterizedJobMixIn)
- Open
- is related to
-
JENKINS-31576 Sandboxed access to upstream build information
- Resolved
-
JENKINS-33578 Snippetizer broken for DownstreamBuildSelector with Jenkins Pipeline
- Closed
-
JENKINS-36152 Reference the upstream job by using CauseAction
- Resolved
- links to