I've updated the ticket description:

  • I was incorrect when I stated that we did not have security enabled.
  • I am not sure why using a predefined parameter / variable when specifying a project name, also requires me to also use the "Permission to Copy Artifact" option. IF I specify the project name directly (no Predefined Parameter / variable is involved), I do not need to use "Permission to Copy Artifact" - why?
Change By: Ivan Fetch (04/Jun/14 3:09 PM)
Description: When using a variable in the Project Name field of CopyArtifact, the project can not be found,  although  unless I also set "Permission to Copy Artifact." However, if I specify  the  correct  project name  is interpolated from the  without using a predefined parameter /  variable,  as it shows up in  the  log (rpm  use of "Permission to Copy Artifact" is not needed . git  

When using a predefined parameter / variable to specify the project name to CopyArtifact
,  below)  the build log shows :
{code}
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.
{code}

The "rpm.git" above, actually comes from a variable,  set by a defined parameter -  yet the project could not be found .  unless  I  have seen similar issues which were caused by  also use "Permission to Copy Artifact."

Specifying a literal
 project  permissions - I do not think this applies  name  to  my issue  CopyArtifact ,  as project security is  does  not  enabled.  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:
{code}
        <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="[email protected]">
      <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>
{code}

Here is an XML snippet from the utils.rpmSign job:
{code}
  <builders>
    <hudson.plugins.copyartifact.CopyArtifact plugin="[email protected]">
      <project>$TRIGGERING_JOB</project>
      <filter></filter>
      <target></target>
      <selector class="hudson.plugins.copyartifact.TriggeredBuildSelector"/>
      <flatten>true</flatten>
      <doNotFingerprintArtifacts>true</doNotFingerprintArtifacts>
    </hudson.plugins.copyartifact.CopyArtifact>
{code}
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to