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

Copy Artifacts from Another Projects Strange Behavior

    Details

    • Similar Issues:

      Description

      It would be nice to avoid the use of a variable to pass the upstream job name, to the downstream job in order to use its artifacts, right now, until we see, the use of a variable is completely necessary, so in an upstream job it's necessary to send a variable with the same name of the job, making also necessary to parametrize the downstream job to catch the upstream job name and then use it to the next steps.

      The curious thing here is: In execute section, it is possible to add the option "Copy Artifacts from Another Projects", which have a field named "Which build" being a dropdown list with the option "Upstream build that triggered this job", but even though this option is selected, it is still necessary to specify the project name from which we want to copy the artiffacts. That does not make sense at all if that we want is in fact to copy the artifacts from the job that triggered our downstream job.

      Even in the log of the downstream job, it shows the upstream job's name that triggered the downstream job, but it fails if we don't pass the variable with the upstream job's name to the field "Project name".

      The point is, when I choose the dropdownlist option "Upstream build that triggered this job", should not the field "Project name" disappear or be deactivated ? Jenkins already knows who triggered the downstream job and the use of an extra variable is completely not necessary, also this makes ambiguous the use of this plugin.

        Attachments

          Activity

          Hide
          ikedam ikedam added a comment -

          Copyartifact requires upstream am project name explicitly as:

          • For its design. Copyartifact decides the job to copy from, and then search builds. The build selection comes later and cannot affect job decision phase.
          • There can be multiple upstream jobs. A case that there’s a grand parent build, or the job is triggered from multiple upstreams and merged into one build.
          Show
          ikedam ikedam added a comment - Copyartifact requires upstream am project name explicitly as: For its design. Copyartifact decides the job to copy from, and then search builds. The build selection comes later and cannot affect job decision phase. There can be multiple upstream jobs. A case that there’s a grand parent build, or the job is triggered from multiple upstreams and merged into one build.
          Hide
          samliddicott Sam Liddicott added a comment -

          Not only must you specify the upstream job, you must specify it as a literal you you can't even prepare a groovy environment that computes the value.

          If a variable is used, the copy fails with a message indicating the actual name that it ought to have been able to copy and can copy if specified literally

          07:10:26 ERROR: Unable to find project for artifact copy: blah/thingy-project 
          07:10:26 This may be due to incorrect project name or permission settings; see help for project name in job configuration.

          Show
          samliddicott Sam Liddicott added a comment - Not only must you specify the upstream job, you must specify it as a literal you you can't even prepare a groovy environment that computes the value. If a variable is used, the copy fails with a message indicating the actual name that it ought to have been able to copy and can copy if specified literally 07:10:26 ERROR: Unable to find project for artifact copy: blah/thingy-project  07:10:26 This may be due to incorrect project name or permission settings; see help for project name in job configuration.

            People

            • Assignee:
              estcr14 Esteban Vargas
              Reporter:
              estcr14 Esteban Vargas
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: