Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16847

Support for copying artifacts from other builds being part of the same MultiJob (previous phases)

    XMLWordPrintable

    Details

    • Similar Issues:

      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.

        Attachments

          Issue Links

            Activity

            Hide
            trojanbug Krzysztof Trojan added a comment -

            Could you please take a look if the contribution could be made part of the next version, I would prefer not to depend on branched code in my builds.

            Show
            trojanbug Krzysztof Trojan added a comment - Could you please take a look if the contribution could be made part of the next version, I would prefer not to depend on branched code in my builds.
            Hide
            trojanbug Krzysztof Trojan added a comment -

            Created a pull request (finally on my machine ):
            https://github.com/jenkinsci/copyartifact-plugin/pull/16

            Show
            trojanbug Krzysztof Trojan added a comment - Created a pull request (finally on my machine ): https://github.com/jenkinsci/copyartifact-plugin/pull/16
            Hide
            mindless Alan Harder added a comment -

            Please ask on the dev alias for someone to accept the pull request, or to get access so you can submit it yourself, thanks!

            Show
            mindless Alan Harder added a comment - Please ask on the dev alias for someone to accept the pull request, or to get access so you can submit it yourself, thanks!
            Hide
            egrumbac Emmanuel Grumbach added a comment -

            I would also be very interested in this feature

            Show
            egrumbac Emmanuel Grumbach added a comment - I would also be very interested in this feature
            Hide
            rsennewald Ray Sennewald added a comment -

            I've added a pull request for this functionality, albeit with a new Selector (MultiJobSelector). I've also added support for grabbing the artifact from a PhaseJob in another PhaseJob or in the parent MultiJob itself: https://github.com/jenkinsci/copyartifact-plugin/pull/49.

            Show
            rsennewald Ray Sennewald added a comment - I've added a pull request for this functionality, albeit with a new Selector (MultiJobSelector). I've also added support for grabbing the artifact from a PhaseJob in another PhaseJob or in the parent MultiJob itself: https://github.com/jenkinsci/copyartifact-plugin/pull/49 .
            Hide
            trojanbug Krzysztof Trojan added a comment -

            Ray, while useful, adding a new selector makes it possible to run the job only within MultiJob.

            What if one wanted to use also in regular pipelines (project triggered both as part of MultiJob and by another project) ?
            In the sense the original concept would I think work better ?

            Show
            trojanbug Krzysztof Trojan added a comment - Ray, while useful, adding a new selector makes it possible to run the job only within MultiJob. What if one wanted to use also in regular pipelines (project triggered both as part of MultiJob and by another project) ? In the sense the original concept would I think work better ?
            Hide
            gokikamukow Paul Holmberg added a comment -

            See JENKINS-25111 for a workaround if you are currently blocked by this issue

            Show
            gokikamukow Paul Holmberg added a comment - See JENKINS-25111 for a workaround if you are currently blocked by this issue

              People

              • Assignee:
                Unassigned
                Reporter:
                trojanbug Krzysztof Trojan
              • Votes:
                3 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated: