詹金斯使用groovy为作业添加权限 [英] Jenkins Add permissions to jobs using groovy

查看:149
本文介绍了詹金斯使用groovy为作业添加权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为特定用户添加一些权限(读取,构建,工作区,取消等)以完成大量工作。
我想知道有一种方法可以使用groovy脚本来完成,而不是手动完成。

解决方案

据我所知,你试图做的事情是不可能的。



链接: https://wiki.jenkins-ci.org/display/JENKINS/Matrix-based+security



如果您想要同时应用于多个作业的更改,我会推荐使用配置切片。



https: //wiki.jenkins-ci.org/display/JENKINS/Configuration+Slicing+Plugin



但我不认为权限是配置切片的一部分无论如何。

I need to add some permissions (Read, Build, Workspace, cancel etc) to a spesific user to a lot of jobs. I'm wondering it there is a way to do that using groovy script instead of doing it manually.

解决方案

As far as I know what you are trying to do is not possible.

Link: https://wiki.jenkins-ci.org/display/JENKINS/Matrix-based+security

I would recommend using 'configuration slicing' if there is a change that you want to apply to multiple jobs at the same time.

https://wiki.jenkins-ci.org/display/JENKINS/Configuration+Slicing+Plugin

but i don't think permissions are part of configuration slicing anyway.

这篇关于詹金斯使用groovy为作业添加权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆