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

Copy Artifacts plugin's "Optional" not working

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: copyartifact-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.457
    • Similar Issues:

      Description

      I have a matrix-configuration job in which I am trying to copy artifacts from an upstream matrix-configuration job where some of the axes combinations of the upstream job are not run and therefore do not produce artifacts. In the job I am running the copy artifacts action I use upstream_job/arch=$arch,distro=$distro as the Project name so that each combination copies it's respective upstream artifacts.

      However knowing that there upstream combinations that are not run and therefore don't have artifacts I have selected "Optional" for this copy artifacts action but it's still failing with:

      Unable to find project for artifact copy: upstream/arch=x86_64,distro=el5
      This may be due to incorrect project name or permission settings; see help for project name in job configuration.
      Build step 'Copy artifacts from another project' marked build as failure
      

      I can't simply exclude the same axes combinations in the job I am doing the artifact copying in as I do upstream since there are other actions that need to be done even when then are no artifacts from the upstream job.

      Am I misunderstanding the use of Optional in the Copy Artifacts plugin?

        Attachments

          Issue Links

            Activity

            Hide
            mindless Alan Harder added a comment -

            "Optional" currently refers only to finding the artifact within a project. Currently the plugin is coded such that failure to find the project (in this case a matrix configuration) is always an error.

            Show
            mindless Alan Harder added a comment - "Optional" currently refers only to finding the artifact within a project. Currently the plugin is coded such that failure to find the project (in this case a matrix configuration) is always an error.
            Hide
            brian Brian Murrell added a comment -

            Is there any plan to change that given my use-case?

            Or have a configurable combination filter (i.e. like the matrix plugin has) per copy artifact action so that that combinations that would be known not to have been built can be listed and the copy action can be skipped for combinations that match the filter?

            Show
            brian Brian Murrell added a comment - Is there any plan to change that given my use-case? Or have a configurable combination filter (i.e. like the matrix plugin has) per copy artifact action so that that combinations that would be known not to have been built can be listed and the copy action can be skipped for combinations that match the filter?
            Hide
            aarondmarasco_vsi Aaron D. Marasco added a comment -

            Over five years later, and I came to re-file this bug. In my case, it's not a Matrix, but a "Multibranch Pipeline" that works fine if the branch was built but blows up if not.

            Show
            aarondmarasco_vsi Aaron D. Marasco added a comment - Over five years later, and I came to re-file this bug. In my case, it's not a Matrix, but a "Multibranch Pipeline" that works fine if the branch was built but blows up if not.

              People

              • Assignee:
                mindless Alan Harder
                Reporter:
                brian Brian Murrell
              • Votes:
                3 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: