-
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
[JENKINS-33577] "Unable to find a build" when using DownstreamBuildSelector with Jenkins Pipelines
Description |
Original:
Given two very basic Jenkins Pipelines: //Pipeline 'a' {code:java} stage 'stage' node{ build 'b' step([$class: 'CopyArtifact', projectName: 'b', selector: [$class: 'DownstreamBuildSelector', upstreamBuildNumber: env.BUILD_NUMBER, upstreamProjectName: env.JOB_NAME]]) } {code} //Pipeline 'b' {code:java} stage 'stage' node{ writeFile file: 'target/b.txt', text: 'b' archive includes:'target/b.txt' } {code} 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. |
New:
Given two basic Jenkins Pipelines: //Pipeline 'a' {code:java} stage 'stage' node{ build 'b' step([$class: 'CopyArtifact', projectName: 'b', selector: [$class: 'DownstreamBuildSelector', upstreamBuildNumber: env.BUILD_NUMBER, upstreamProjectName: env.JOB_NAME]]) } {code} //Pipeline 'b' {code:java} stage 'stage' node{ writeFile file: 'target/b.txt', text: 'b' archive includes:'target/b.txt' } {code} 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. |
Labels | New: workflow |
Remote Link | New: This issue links to "PR 80 (Web Link)" [ 14078 ] |
Link |
New:
This issue is related to |
Link | New: This issue depends on JENKINS-29913 [ JENKINS-29913 ] |
Link |
New:
This issue is related to |
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Link |
New:
This issue is related to |
Workflow | Original: JNJira [ 169529 ] | New: JNJira + In-Review [ 198628 ] |
Labels | Original: workflow | New: pipeline workflow |