Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I jenkins permission on a per job basis?

Tags:

jenkins

Some jobs push to QA and some jobs push to Production.

Only devs should be allowed to push to QA and only QA should be allowed to push to production. Aside from making two separate build servers (with some way to share artifacts) how do I restrict permissions?

like image 652
diadem Avatar asked Aug 29 '14 22:08

diadem


People also ask

How do I restrict Jenkins jobs to execute on a specific machine?

Set the "Restrict where this job can be run" check box in your job configuration and specify the name of your slave. If you add more slaves later, you can set labels for each slave and specify those in your job configs. See this reference documentation: https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds.

How do I manage roles and permissions in Jenkins?

Enable Role-Based Strategy on JenkinsStep 1: After Plugin installation, go to the 'Manage Jenkins' and then click on 'Configure Global Security'. Check on Enable security option. Step 2: On the Security Realm section, select 'jenkins' own user database'. On Authorization section, select 'Role-Based Strategy'.


1 Answers

You need Project-based Matrix Authorization Strategy in Global Configuration, and on the Job Configuration, use Enable Project-based Security.

It's all explained here
Standard Security Explained

like image 141
Slav Avatar answered Oct 05 '22 03:10

Slav