Role Strategy Plugin - how to apply multiple patterns in project roles

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Role Strategy Plugin - how to apply multiple patterns in project roles

Jan Seidel-2

Hi folks,

I am setting up Role Strategy as too many people can peek and poke in too many jobs and mess around.
We have many build jobs which leads me to a problem when assigning Roles in Projects roles.

I need multiple patterns for a single role if possible.
e.g. the role MIB admin must access all jobs starting with (?i)RB_MIB.*, (?i)HMI_MIB.* and (?i)JXE_MIB.* but not (?i)MB_GUIDE_MIB.* nor any other job that is outside of the scope of this project.
So simply taking (?i).*MIB.* won't work.

Is it possible to use multiple patterns for one role and if yes, how?

Cheers
Jan


--
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].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Role Strategy Plugin - how to apply multiple patterns in project roles

Daniel Beck
There's no way to define multiple patterns for a given role (which would enable different permissions depending on the job for the same role).

But the pattern '(RB|HMI|JXE)_MIB.*' should do it. Maybe look up the java.util.regex.Pattern docs?

On 11.10.2013, at 13:25, Jan Seidel <[hidden email]> wrote:

>
>
> Hi folks,
>
> I am setting up Role Strategy as too many people can peek and poke in too many jobs and mess around.
> We have many build jobs which leads me to a problem when assigning Roles in Projects roles.
>
> I need multiple patterns for a single role if possible.
> e.g. the role MIB admin must access all jobs starting with (?i)RB_MIB.*, (?i)HMI_MIB.* and (?i)JXE_MIB.* but not (?i)MB_GUIDE_MIB.* nor any other job that is outside of the scope of this project.
> So simply taking (?i).*MIB.* won't work.
>
> Is it possible to use multiple patterns for one role and if yes, how?
>
> Cheers
> Jan
>
>
>
> --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.

--
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].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Role Strategy Plugin - how to apply multiple patterns in project roles

Maneesh M P
You can do with piping I guess

(?i)RB_MIB.* | (?i)HMI_MIB.*  | (?i)JXE_MIB.*

Thanks,
Maneesh

On Friday, October 11, 2013 4:35:12 AM UTC-7, Daniel Beck wrote:
There's no way to define multiple patterns for a given role (which would enable different permissions depending on the job for the same role).

But the pattern '(RB|HMI|JXE)_MIB.*' should do it. Maybe look up the java.util.regex.Pattern docs?

On 11.10.2013, at 13:25, Jan Seidel <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="LLnw32CRh98J">wakk...@...> wrote:

>
>
> Hi folks,
>
> I am setting up Role Strategy as too many people can peek and poke in too many jobs and mess around.
> We have many build jobs which leads me to a problem when assigning Roles in Projects roles.
>
> I need multiple patterns for a single role if possible.
> e.g. the role MIB admin must access all jobs starting with (?i)RB_MIB.*, (?i)HMI_MIB.* and (?i)JXE_MIB.* but not (?i)MB_GUIDE_MIB.* nor any other job that is outside of the scope of this project.
> So simply taking (?i).*MIB.* won't work.
>
> Is it possible to use multiple patterns for one role and if yes, how?
>
> Cheers
> Jan
>
>
>
> --
> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="LLnw32CRh98J">jenkinsci-use...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
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].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: Role Strategy Plugin - how to apply multiple patterns in project roles

Kaushal
Maneesh thanks for the reference.

@danielĀ 

the following worked for me

"(?)joba||(?)jobb||(?)jobc||(?)jobn"

where job{a..n} are the job names.

--
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/36290579-3d9c-4f61-adc0-ff35d467918d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.