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

Copy Artifact plugin: Unable to find project for artifact copy when using a build parameter

      Error message:

      ...
      project_name=daily
      _=/bin/env
      Unable to find project for artifact copy: daily
      This may be due to incorrect project name or permission settings; see help for project name in job configuration.
      Build step 'Copy artifacts from another project' marked build as failure
      ...
      

      When I set the project name by hand, there is no error. When I use a build parameter, and set its value to the same value as the hand typed value, it fails. The above message show what variable I use: $project_name

      Please see the screenshots for the configuration details.

          [JENKINS-14999] Copy Artifact plugin: Unable to find project for artifact copy when using a build parameter

          Martin d'Anjou created issue -

          Martin d'Anjou added a comment - - edited

          After reading more closely the help, I decided to upload another image, this time showing global project permissions. There is no per-project permissions.

          Martin d'Anjou added a comment - - edited After reading more closely the help, I decided to upload another image, this time showing global project permissions. There is no per-project permissions.
          Martin d'Anjou made changes -
          Attachment New: copy-artifact-shot3.png [ 22402 ]

          Alan Harder added a comment -

          I think your screenshot shows exactly the situation described in the help.. your project is not accessible to the group for all authenticated users (I think it's called "authenticated", if I remember correctly).

          Alan Harder added a comment - I think your screenshot shows exactly the situation described in the help.. your project is not accessible to the group for all authenticated users (I think it's called "authenticated", if I remember correctly).
          Alan Harder made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Do you mean that the group (the second row on the matrix authorization strategy screenshot) needs to be granted the same permissions as the user who has the most permissions?

          Martin d'Anjou added a comment - Do you mean that the group (the second row on the matrix authorization strategy screenshot) needs to be granted the same permissions as the user who has the most permissions?

          Alan Harder added a comment -

          No, I mean add a new row for the group called "authenticated" that grants job read permission.

          Alan Harder added a comment - No, I mean add a new row for the group called "authenticated" that grants job read permission.

          Thank you. It works now.

          My only comment is that the documentation could be clearer. It says "...the source project must be accessible to all authenticated users;..." May I suggest instead something like "you must have a group called 'authenticated' and grant the Job Read permission to this group". What confounded me is that I did have the Job Read permission granted for all the users and the group defined in the screenshot, so to me, I was not missing anything. Maybe the error message could say something along these lines as well. Thank you for the help.

          Martin d'Anjou added a comment - Thank you. It works now. My only comment is that the documentation could be clearer. It says "...the source project must be accessible to all authenticated users;..." May I suggest instead something like "you must have a group called 'authenticated' and grant the Job Read permission to this group". What confounded me is that I did have the Job Read permission granted for all the users and the group defined in the screenshot, so to me, I was not missing anything. Maybe the error message could say something along these lines as well. Thank you for the help.

          Mark Wigzell added a comment -

          Hi I wish to reopen this bug since it is actually a bug for a different reason, namely that the use has access to the selected job if he doesn't use dynamic project name, but hard codes it instead. The fact that one must enable read access for specifying a project via a dynamic variabe vs. specifying it in a hardcoded fashion indicates there is a bug in copy artifacts which should forbid the access unless the authenticated group is added with read permissions for jobs. (This is a very badly documented feature, and has caused me no end of trouble)

          Mark Wigzell added a comment - Hi I wish to reopen this bug since it is actually a bug for a different reason, namely that the use has access to the selected job if he doesn't use dynamic project name, but hard codes it instead. The fact that one must enable read access for specifying a project via a dynamic variabe vs. specifying it in a hardcoded fashion indicates there is a bug in copy artifacts which should forbid the access unless the authenticated group is added with read permissions for jobs. (This is a very badly documented feature, and has caused me no end of trouble)
          Mark Wigzell made changes -
          Resolution Original: Not A Defect [ 7 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]

            ikedam ikedam
            deepchip Martin d'Anjou
            Votes:
            2 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: