How to block some Jobs for some user level in Jenkins?

拜拜、爱过 提交于 2019-12-08 02:55:51

问题


I want a block some jobs for a user level for example I have 3 jobs:

Job1 (All the register user can execute this). Job2 (Only some user can execute this) Job3 (All the register user can execute this).


回答1:


Set the Global Security (http://<your_server>/configureSecurity/?) to the configuration that matches most jobs (enable Job Build) and then enable Project-based security for the other jobs (via the jon configuration) and set up as required by disabling Job Build.

Enter the user name in User/group to add: and then configure as required. In this case I've limited control to two users




回答2:


You need to use Project-based Matrix Authorization Strategy to achieve this. Hudson/Jenkin >> Manage Hudson >> Configre Security >> Authorization, and select Project-based Matrix Authorization Strategy. Now in the configuration page of each job you will have an option Enable job-based security. You can give access permissions for the users here.




回答3:


This works for me : Role Strategy Plugin

But you need understand it and its official documentation is poor, so go to :

https://stackoverflow.com/a/38516162/3957754




回答4:


The below link provides the clear guideline to grant/restrict the access to Jenkins Jobs. http://www.kblearningacademy.com/configure-role-strategy-plugin-in-jenkins/ Its very useful & am able to do the same.



来源:https://stackoverflow.com/questions/21094269/how-to-block-some-jobs-for-some-user-level-in-jenkins

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!