Status: Fixed but Unreleased (View Workflow)
Resolution: Won't Fix
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.
|Field||Original Value||New Value|
|Summary||Copy Artifacts from Another Projects Extrange Behavior||Copy Artifacts from Another Projects Strange Behavior|
|Workflow||JNJira [ 168828 ]||JNJira + In-Review [ 183249 ]|
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.
|Assignee||Esteban Vargas [ estcr14 ]|
|Resolution||Won't Fix [ 2 ]|
|Status||Open [ 1 ]||Fixed but Unreleased [ 10203 ]|
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.