When using a variable in the Project Name field of CopyArtifact, the project can not be found, although the correct project name is interpolated from the variable, as it shows up in the log (rpm.git, below):
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, yet the project could not be found. I have seen similar issues which were caused by project permissions - I do not think this applies to my issue, as project security is not enabled.
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>
|