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

Parameterized project name does not work with Jenkins 1.399

    Details

    • Similar Issues:

      Description

      The copy artifact plugin does not seem to work if the project name is specified in a build parameter. For example, I receive the following error in then Jenkins build console:

      Started by upstream project "MyProject Nightly" build number 209
      ...........
      Unable to find project for artifact copy: MyProject Nightly/com.project.install$ProjectDistribution/

      Here I am trying to copy the artifacts from the MyProject Nightly job. Within the Copy Artifact configuration, I have the word "Nightly" in a build parameter like so:

      MyProject $SOURCE_PROJECT/com.project.install$ProjectDistribution/

      From the above log, you can see that the substitution is being made correctly, as the error message says the same build name as the triggering project. However this build fails because it says it cannot find the project. If I remove the parameter and configure the plugin like so:

      MyProject Nightly/com.project.install$ProjectDistribution/

      it works fine. The error only occurs when using a build parameter.

        Attachments

          Activity

          Show
          mindless Alan Harder added a comment - Ok, give this a go with copyartifact: http://ci.jenkins-ci.org/view/Plugins/job/plugins_collabnet/3/org.jenkins-ci.plugins$collabnet/
          Hide
          gms5002 Greg Snyder added a comment -

          Thanks! Works like a charm for a build I triggered manually. I have some nightly builds which will run later tonight - those will be triggered by a timer. Is there any other type of trigger you want me to test?

          I tested this in Jenkins 1.400 as well and it works fine.

          Show
          gms5002 Greg Snyder added a comment - Thanks! Works like a charm for a build I triggered manually. I have some nightly builds which will run later tonight - those will be triggered by a timer. Is there any other type of trigger you want me to test? I tested this in Jenkins 1.400 as well and it works fine.
          Hide
          mindless Alan Harder added a comment -

          I don't know exactly how collabnet works, but from the code it looks like you can go into a particular job and enable some job-specific permissions? Can you try this, and try copying artifacts from such a job, using a parameter to select that job? I'm expecting it won't work (adding the job-specific params takes away the "accessible to all authenticated users"), but want to make sure it doesn't totally break or something..

          Show
          mindless Alan Harder added a comment - I don't know exactly how collabnet works, but from the code it looks like you can go into a particular job and enable some job-specific permissions? Can you try this, and try copying artifacts from such a job, using a parameter to select that job? I'm expecting it won't work (adding the job-specific params takes away the "accessible to all authenticated users"), but want to make sure it doesn't totally break or something..
          Hide
          gms5002 Greg Snyder added a comment -

          I believe I already have this enabled, and it DOES work. Basically, in Team Forge users can be a member of one or more projects and project administrators can assign you permissions for SVN, Jenkins, etc. In the option you are talking about above, Jenkins wants to know the Team Forge project the job is associated with so that it can find the right permissions. What I could try tomorrow when I get back to the office is put the "copy from" job in one Team Forge project and the downstream job in a different project. Then, I can revoke my coworker's access to the "copy from" job and see what happens when they build the downstream job (this should presumably not work). Does that make sense, or am I off base?

          Show
          gms5002 Greg Snyder added a comment - I believe I already have this enabled, and it DOES work. Basically, in Team Forge users can be a member of one or more projects and project administrators can assign you permissions for SVN, Jenkins, etc. In the option you are talking about above, Jenkins wants to know the Team Forge project the job is associated with so that it can find the right permissions. What I could try tomorrow when I get back to the office is put the "copy from" job in one Team Forge project and the downstream job in a different project. Then, I can revoke my coworker's access to the "copy from" job and see what happens when they build the downstream job (this should presumably not work). Does that make sense, or am I off base?
          Hide
          mindless Alan Harder added a comment -

          ok, marking as resolved in collabnet 1.1.6

          Show
          mindless Alan Harder added a comment - ok, marking as resolved in collabnet 1.1.6

            People

            • Assignee:
              mindless Alan Harder
              Reporter:
              gms5002 Greg Snyder
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: