Reputation: 10089
I'd like to use an other project to promote my builds. I am using this plugin https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin
But I have the following error message when I am linking a project
This is working but not really properly. Promotion logs:
Started by user admin
Building in workspace /var/lib/jenkins/workspace/generator-api
Promoting generator-api #86
build hudson.plugins.parameterizedtrigger.BuildTrigger@36339454 SUCCESS
Warning: this build has no associated authentication, so build permissions may be lacking, and downstream projects which cannot even be seen by an anonymous user will be silently skipped
Finished: SUCCESS
I should have the deploy build there as well.
I can't find how to give permission to my project to build deploy when promoting.
Upvotes: 4
Views: 11530
Reputation: 16980
I was having similar issue when trying to add new trigger for building another project, and this seems to resolve it:
With the Authorize Project plugin, you should go to "Access Control for Builds" section, in the Global Security athttps://{your-jenkins-domain}/configureSecurity/
:
Adding a new strategy "Run as SYSTEM", allowed the Jenkins Cron scheduler to trigger build on another project.
Note however, that the red warning "You have no permission to build" did not disappeared, although it did not prevent the triggered build to be launched by the scheduler.
Upvotes: 0
Reputation: 4956
From what I can see the downstream project should have Run as User who Triggered Build
options selected in Configure Build Authorization
section.
In my case that options is missing. To enable that see following Jenkins plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Authorize+Project+plugin
EDIT
I solved the problem in different way. I had this code in execute shell of promote section:
git tag -d DEVENV
git tag DEVENV ${PROMOTED_GIT_COMMIT}
git push origin --tags —force
Problem was that the tag didn't exist and the script was failing on the first line trying to delete it.
It is very likely that the auth warning message is vague and hides different problems.
Upvotes: 1