How to use Jenkinsfile to set job permission properties (AuthorizationMatrixProperty)

862 wyświetlenia
Przejdź do pierwszej nieodczytanej wiadomości

Rudy Gevaert

nieprzeczytany,
7 gru 2016, 13:05:507.12.2016
do Jenkins Users
Hello Jenkins users

I'm trying to use the Jenkinsfile to set the permissions of a job.  When I use the groovy Snippet Generator it gives me this

properties([<object of type hudson.security.AuthorizationMatrixProperty>, pipelineTriggers([])])

How can I do this?

I managed to set all my parameters of the job through the properties function, however it resets every time the permissons I set through the webinterface.  (Which is a real problem).  So I need to know how to set the permissions through the Jenkinsfile.

Thank you in advance,

Rudy

seva.p...@gmail.com

nieprzeczytany,
12 lis 2017, 06:28:4112.11.2017
do Jenkins Users
Absolutey the same. Snippet generator prints out object's "signature" instead of pipeline instruction set:
properties([<object of type hudson.security.AuthorizationMatrixProperty>, pipelineTriggers([])])



Did anybody know: how to owercome it and obtain valid instructions set with auth matrix for an account?

Or simple:

What is a syntax for or how to specify authorization matrix property inside Jenkins pipeline script???

Daniel Beck

nieprzeczytany,
12 lis 2017, 09:04:0112.11.2017
do jenkins...@googlegroups.com

> On 12. Nov 2017, at 11:35, seva.p...@gmail.com wrote:
>
> What is a syntax for or how to specify authorization matrix property inside Jenkins pipeline script???

Per your other question, you're still on 2.7.x -- but for this, you need matrix-auth plugin 2.0 or newer, which requires Jenkins 2.60.x or newer.

Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0