Using Sonarqube 6.2, I have setup a permissions template with a Project Key Pattern: 'generic\.*'. That permssions template has a group that contains a user. When I run sonarscan on a new project with sonar.projectKey=generic.org.sonarqube:parent2, the user can't see the project till I 'Apply Permissions Template' to that new project. My understanding was that the matching permissions template should be applied automatically on new project creation without an Admin user being required to apply the template manually through the UI ?
Sonarqube 6.2 not assigning project to group when new project is created against a matching permissions template
895 Views Asked by Steve C At
2
As indicated in the UI when creating a Permission Template: the Project Key Pattern should be a valid regular expression.
So your problem seems to simply boil down to regex definition:
generic.org.sonarqube:parent2
does not fully match withgeneric\.*
(see online regex tester). You miss a dot before that trailing*
in order to match 0 or more characters at the end.All in all: try with
generic\..*
as regex.