KMG
KMG

Reputation: 927

Jenkins Role-based Auth plugin : Jobs sub directory regex match

I have created a jobs inside subdirectory called "projectv1.0/demo/dev1.0"

I tried to write a pattern match in "Role" tab to particular user. like

projectv1.0/demo/dev1.0

Its got failed. Is the subdirectory pattern match won't work on "Role-Based statergy Plugin.

Upvotes: 6

Views: 6553

Answers (3)

Michael Xin
Michael Xin

Reputation: 1

Try this:

^projectv1\.0($|/demo($|/dev1\.0($|/.*)))

Upvotes: 0

Camilo Silva
Camilo Silva

Reputation: 8721

Using the Jenkins Role-based Authorization Strategy plugin you can restrict access to only jobs under projectv1.0/demo/dev1.0 folder adding a «Item Role» with the following pattern:

projectv1.0(/demo(/dev1.0(/.*)?)?)?

Upvotes: 0

Aston_R
Aston_R

Reputation: 71

I also had the same issue. You need to use the following regexp: projectv1.0|projectv1.0/demo|projectv1.0/demo/dev1.0.*

more detailed info is available at https://issues.jenkins-ci.org/browse/JENKINS-24767 (second comment)

Upvotes: 7

Related Questions