Set permissions for each job in Jenkins

Set permissions for each job in Jenkins

To set permissions for each job in Jenkins, install the “Role-based Authorization Strategy” plugin.

Go to “Jenkins Administration” – “Manage Plugins” and select the “Available” tab.

Install and restart the “Role-based Authorization Strategy” plugin.

Log in with administrative privileges and set the authorization management to “Role-Based Strategy” from “Jenkins Administration” – “Global Security Settings”.

Once activated, a menu item called “Manage and Assign Roles” will appear in Jenkins administration.

Click “Manage and Assign Roles” to display the following screen.

Click on “Manage Roles.

Registering privileges in Global roles

Register any name in the “Role to add” field.

For a test, register “dev”. Then the following message is displayed.

I don’t think admin needs to be changed.

Only the overall Read permission will be raised to dev’s permissions.

Register permissions for project roles

Project is a job in Jenkins.

Enter “dev” in the “Role to add” field.

Enter the job name in the “Pattern” field. You can also use regular expressions.

For example, if you want a role to have the privileges of A_JOB and B_JOB, enter

A_JOB|B_JOB” in the Pattern field.

Now “Save” is done. The permission settings are complete.

Next, click “Assign Roles” on the “Manage and Assign Roles” screen.

On this screen, map the login user and permissions.

Global rolesのユーザに権限を登録する

Enter the Jenkins user name in the “User/group to add” field.

Once the user is added, check the Roles checkbox.

Project rolesのユーザに権限を登録する

Enter the Jenkins user name in the “User/group to add” field.

Once the user is added, check the Roles checkbox.

Save” to complete the setup.

コメント

Discover more from 株式会社CONFRAGE ITソリューション事業部

Subscribe now to keep reading and get access to the full archive.

Continue reading

Copied title and URL