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

1,660 views
Skip to first unread message

martin.danjou14@gmail.com (JIRA)

unread,
Aug 30, 2012, 3:00:49 PM8/30/12
to jenkinsc...@googlegroups.com
Issue Type: Bug Bug
Affects Versions: current
Assignee: Alan Harder
Attachments: copy-artifact-shot1.png, copy-artifact-shot2.png
Components: copyartifact
Created: 30/Aug/12 6:59 PM
Description:

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.

Project: Jenkins
Priority: Critical Critical
Reporter: Martin d'Anjou
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

martin.danjou14@gmail.com (JIRA)

unread,
Aug 30, 2012, 3:16:49 PM8/30/12
to jenkinsc...@googlegroups.com

Project permissions

Change By: Martin d'Anjou (30/Aug/12 7:14 PM)
Attachment: copy-artifact-shot3.png

martin.danjou14@gmail.com (JIRA)

unread,
Aug 30, 2012, 3:16:49 PM8/30/12
to jenkinsc...@googlegroups.com
 
Martin d'Anjou edited a comment on Bug JENKINS-14999

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

mindless@java.net (JIRA)

unread,
Sep 4, 2012, 3:13:49 AM9/4/12
to jenkinsc...@googlegroups.com
Alan Harder resolved Bug JENKINS-14999 as Not A Defect

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).

Change By: Alan Harder (04/Sep/12 7:13 AM)
Status: Open Resolved
Resolution: Not A Defect

martin.danjou14@gmail.com (JIRA)

unread,
Sep 4, 2012, 8:13:49 AM9/4/12
to jenkinsc...@googlegroups.com

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?

mindless@java.net (JIRA)

unread,
Sep 4, 2012, 4:15:49 PM9/4/12
to jenkinsc...@googlegroups.com
Alan Harder commented on Bug JENKINS-14999

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

martin.danjou14@gmail.com (JIRA)

unread,
Sep 5, 2012, 9:08:49 AM9/5/12
to jenkinsc...@googlegroups.com

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.

mwigzell@tweddle.com (JIRA)

unread,
Aug 1, 2013, 4:32:47 PM8/1/13
to jenkinsc...@googlegroups.com

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)

Change By: Mark Wigzell (01/Aug/13 8:31 PM)
Resolution: Not A Defect
Status: Resolved Reopened

scm_issue_link@java.net (JIRA)

unread,
Nov 11, 2013, 9:09:57 AM11/11/13
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: ikedam
Path:
src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testPerProjectPermissionTriggeredByUser/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testPerProjectPermissionTriggeredByUser/users/admin/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testPerProjectPermissionTriggeredByUser/users/test1/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testPerProjectPermissionTriggeredByUser/users/test2/config.xml
http://jenkins-ci.org/commit/copyartifact-plugin/46540cc88dee2ecc56ede5c389b48e4f89d1c539
Log:
JENKINS-14999 Add a test for per-project per-user permissions.

Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/f468296f905b...46540cc88dee

scm_issue_link@java.net (JIRA)

unread,
Nov 11, 2013, 9:09:57 AM11/11/13
to jenkinsc...@googlegroups.com
Change By: SCM/JIRA link daemon (11/Nov/13 2:08 PM)
Status: Reopened Resolved
Resolution: Fixed

scm_issue_link@java.net (JIRA)

unread,
Nov 11, 2013, 9:09:57 AM11/11/13
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: ikedam
Path:
src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
http://jenkins-ci.org/commit/copyartifact-plugin/6f920cde153c03383271b0a1435528f21c723a88
Log:
[FIXED JENKINS-14999] Check permission to the project to copy from by the user triggered that build.

devld@ikedam.jp (JIRA)

unread,
Nov 18, 2013, 1:34:58 PM11/18/13
to jenkinsc...@googlegroups.com

As described in https://github.com/jenkinsci/copyartifact-plugin/pull/24 , we should resolve this issue using QueueItemAuthenticater.
Above commits are merged by some accidents, and should be reverted.

Change By: ikedam (18/Nov/13 6:34 PM)
Resolution: Fixed
Status: Resolved Reopened

scm_issue_link@java.net (JIRA)

unread,
Nov 19, 2013, 8:20:57 AM11/19/13
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: ikedam
Path:
src/main/java/hudson/plugins/copyartifact/CopyArtifact.java


src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testPerProjectPermissionTriggeredByUser/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testPerProjectPermissionTriggeredByUser/users/admin/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testPerProjectPermissionTriggeredByUser/users/test1/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testPerProjectPermissionTriggeredByUser/users/test2/config.xml

http://jenkins-ci.org/commit/copyartifact-plugin/ce20ba90919582a0c6cc3b262f7d6cbbb7b36f5e
Log:
JENKINS-14999 Reverted unintended merging of #24. I'll handle this problem using QueueItemAuthenticator instead. Reverted 6f920cde153c03383271b0a1435528f21c723a88 and 46540cc88dee2ecc56ede5c389b48e4f89d1c539 .

devld@ikedam.jp (JIRA)

unread,
Dec 1, 2013, 2:48:58 AM12/1/13
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
Dec 15, 2013, 1:32:02 AM12/15/13
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: ikedam
Path:
src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
http://jenkins-ci.org/commit/copyartifact-plugin/84594eccc100d1ac6e77703aa7b53b963fccf97a
Log:
[FIXED JENKINS-14999] The authorization of builds are considered (when used with QueueItemAuthenticator). QueueItemAuthenticator is available from Jenkins 1.520.

scm_issue_link@java.net (JIRA)

unread,
Dec 15, 2013, 1:32:02 AM12/15/13
to jenkinsc...@googlegroups.com
Change By: SCM/JIRA link daemon (15/Dec/13 6:31 AM)
Status: Reopened Resolved
Resolution: Fixed

scm_issue_link@java.net (JIRA)

unread,
Dec 15, 2013, 1:32:02 AM12/15/13
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: ikedam
Path:
src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testQueueItemAuthenticator/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testQueueItemAuthenticator/users/admin/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testQueueItemAuthenticator/users/test1/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testQueueItemAuthenticator/users/test2/config.xml
http://jenkins-ci.org/commit/copyartifact-plugin/c0cde9aa27bc9f74c41d549ca28f737f3f648819
Log:
JENKINS-14999 Added tests for supports of QueueItemAuthenticator. As it works only with Jenkins >= 1.521, it is commented out for now.

scm_issue_link@java.net (JIRA)

unread,
Dec 15, 2013, 1:32:02 AM12/15/13
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: ikedam
Path:
src/main/java/hudson/plugins/copyartifact/CopyArtifact.java


src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testQueueItemAuthenticator/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testQueueItemAuthenticator/users/admin/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testQueueItemAuthenticator/users/test1/config.xml
src/test/resources/hudson/plugins/copyartifact/CopyArtifactTest/testQueueItemAuthenticator/users/test2/config.xml

devld@ikedam.jp (JIRA)

unread,
Feb 15, 2014, 11:01:39 PM2/15/14
to jenkinsc...@googlegroups.com
ikedam closed Bug JENKINS-14999 as Fixed

Fixed in Copyartifact 1.29

Change By: ikedam (16/Feb/14 4:01 AM)
Status: Resolved Closed

scm_issue_link@java.net (JIRA)

unread,
Feb 14, 2015, 2:15:33 AM2/14/15
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: ikedam
Path:
src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
http://jenkins-ci.org/commit/copyartifact-plugin/ec41cbdd914d33d606734b8f36460efc25913af4
Log:
Merge pull request #60 from ikedam/feature/JENKINS-14999_EnableTestsForQueueItemAuthentication

JENKINS-14999 Enabled tests for QueueItemAuthenticator

Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/47e05f2703db...ec41cbdd914d

scm_issue_link@java.net (JIRA)

unread,
Feb 14, 2015, 2:15:33 AM2/14/15
to jenkinsc...@googlegroups.com

Code changed in jenkins
User: ikedam
Path:
src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
http://jenkins-ci.org/commit/copyartifact-plugin/6eab69d0972fdd508da88a39b7a90e9a2042cb65
Log:
JENKINS-14999 Enabled tests for QueueItemAuthenticator as copyartifact now targets for Jenkins 1.580.1 > 1.521.

Reply all
Reply to author
Forward
0 new messages