首页 > 应用开发 > IT综合 > Jenkins 角色权限
官网参考:https://wiki.jenkins.io/display/JENKINS/Role+Strategy+Plugin
csdn参考: https://blog.csdn.net/lipei1220/article/details/78623226
1.安装插件: Role Strategy Plugin
2.插件配置:Jenkins -> 系统管理 ->Configure Global Security
3.权限配置 Jenkins -> 系统管理-> Manage and Assign Roles
4.增加角色,并且给角色赋权限
项目角色的匹配规则(正则)
There's nothing much to say here, this is self-explanatory. The only tricky field is the Pattern one. This field consists in a regular expression aimed at matching the full name (including the folder name, if you're using Cloudbees Folders Plugin) of the jobs which the role will apply to. For example, if you set the field to "Roger-.*", then the role will match all jobs which name starts with "Roger-". Note that the pattern is case-sensitive. To perform a case-insensitive match, use (?i) notation: upper, "Roger-.*" vs. lower, "roger-.*" vs. case-insensitive, "(?i)roger-.*". If you have a nested folder structure where you want to provide the particular access to the second folder (or deeper), consider having a two-level security structure as well (Say you want to provide exclusive write/ modify type access to foo/bar and not everything else under "foo": First, assign that user/ group to read/ discover permissions with pattern " ^foo.* ", then assign that same user/ group to the more particular permissions with pattern " ^foo/bar.* " - Similar to what you'd do in a Unix/ Linux environment.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/807718/viewspace-2153678/ ,如需转载,请注明出处,否则将追究法律责任。