-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
Jenkins ver. 1.550
When using a variable in the Project Name field of CopyArtifact, the project can not be found, unless I also set "Permission to Copy Artifact." However, if I specify the project name without using a predefined parameter / variable, the use of "Permission to Copy Artifact" is not needed.
When using a predefined parameter / variable to specify the project name to CopyArtifact, the build log shows:
Building on master in workspace /build/jenkins/jobs/utils.rpmSign/workspace No emails were triggered. Unable to find project for artifact copy: rpm.git This may be due to incorrect project name or permission settings; see help for project name in job configuration.
The "rpm.git" above, actually comes from a variable, set by a defined parameter - yet the project could not be found unless I also use "Permission to Copy Artifact."
Specifying a literal project name to CopyArtifact, does not produce the above error, but also does not require me to use "Permission to Copy Artifact - why?"
More Background (XML snippets below also):
- The rpm.git project has a promotion, which triggers a built for the utils.rpmSign project.
- The promotion has a build parameter of it's own, for a pass phrase used with a GPG key.
- Any current build parameters are passed to utils.rpmSign
- There is a pre defined parameter: TRIGGERING_JOB=$PROMOTED_JOB_NAME - even if I set the variable directly to a string, TRIGGERING_JOB=rpm.git, I still receive the above error.
- The utils.rpmSign job uses CopyArtifact, and specifies a Project Name of: $TRIGGERING_JOB - while the log shows the contents of the variables, the project is still reported to not be found.
Here is an XML snippet from the promotion which calls the utils.rpmSign job - in this case, I am setting TRIGGERING_JOB directly yto rpm.git, but that job name can still not be found:
<hudson.model.PasswordParameterDefinition> <name>gpg_key_passphrase</name> <description>the pass phrase for the GPG key used to sign RPMs</description> <defaultValue>qHcBowhUDIvESDutbuVR0w==</defaultValue> </hudson.model.PasswordParameterDefinition> </parameterDefinitions> </hudson.plugins.promoted__builds.conditions.ManualCondition> </conditions> <icon>star-purple</icon> <buildSteps> <hudson.plugins.parameterizedtrigger.TriggerBuilder plugin="parameterized-trigger@2.22"> <configs> <hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig> <configs> <hudson.plugins.parameterizedtrigger.CurrentBuildParameters/> <hudson.plugins.parameterizedtrigger.PredefinedBuildParameters> <properties>TRIGGERING_JOB=rpm.git</properties> </hudson.plugins.parameterizedtrigger.PredefinedBuildParameters> </configs> <projects>utils.rpmSign</projects> <condition>ALWAYS</condition>
Here is an XML snippet from the utils.rpmSign job:
<builders> <hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.29"> <project>$TRIGGERING_JOB</project> <filter></filter> <target></target> <selector class="hudson.plugins.copyartifact.TriggeredBuildSelector"/> <flatten>true</flatten> <doNotFingerprintArtifacts>true</doNotFingerprintArtifacts> </hudson.plugins.copyartifact.CopyArtifact>