jenkinsci / jenkinsci/copyartifact-plugin
[JENKINS-16847] Support for copying artifacts from other builds being part of the same MultiJob (previous phases)
- Dominant language
- Java
- Stars
- 67
- Forks
- 122
- Avg merge
- 2h 8m
- Merged PRs (30d)
- 1
Description
Currently there is no easy way of selecting the right build to copy artifacts from if the project we want to copy from is part of MultiJob.
The "Last Successful Build" is prone for selecting the wrong build if the project was build again in the meantime between the MultiJob start and current moment
and "Upstream Project That Triggered this Build" does not work as previously executed builds in the same MultiJob are not considered "upstream" (are not listed as "causes").
A patch to TriggeredBuildSelector has been created to explicitly support MultiJob plugin pipelines and query it for builds already completed, treating them as if they were "causes". Somewhat dirty (for in for loop
), but works correctly and for the number of projects in a pipeline does not matter much.
See attachment and a corresponding pull request.
---
Originally reported by trojanbug, imported from: Support for copying artifacts from other builds being part of the same MultiJob (previous phases)
Raw content of original issue
Currently there is no easy way of selecting the right build to copy artifacts from if the project we want to copy from is part of MultiJob.
The "Last Successful Build" is prone for selecting the wrong build if the project was build again in the meantime between the MultiJob start and current moment
and "Upstream Project That Triggered this Build" does not work as previously executed builds in the same MultiJob are not considered "upstream" (are not listed as "causes").A patch to TriggeredBuildSelector has been created to explicitly support MultiJob plugin pipelines and query it for builds already completed, treating them as if they were "causes". Somewhat dirty (for in for loop
), but works correctly and for the number of projects in a pipeline does not matter much.
See attachment and a corresponding pull request.
1 attachment
- [copyartifact-plugin-trojanbug.zip](https://issues.jenkins.io/secure/attachment/23195/copyartifact-plugin-trojanbug.zip)
Contributor guide
Research direction
Start by reviewing TriggeredBuildSelector and the attached copyartifact-plugin-trojanbug.zip patch, then compare it with the corresponding pull request mentioned in the issue. Confirm how completed builds from earlier MultiJob phases are exposed and selected. Done means the appropriate prior build is treated like an upstream cause without falling back to an unrelated last successful build.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100