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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Rudy Gevaert
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

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/683f4a77-67c1-4c15-8bea-f0b705476b88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

seva.post.64
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???

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d7d0df4a-7edc-4184-bdb4-c9ba287fe1a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Daniel Beck

> On 12. Nov 2017, at 11:35, [hidden email] 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.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9648ED0C-D400-40C8-AD26-86C74D98193D%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.