openshift4
(open shift)
August 11, 2022, 10:23am
1
Must-share information (formatted with Markdown ):
which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
what are you trying to achieve
what have you tried so far to achieve this
Hi SonarQube,
SonarQube version : 8.9.6
The entire story is like this: we have five developer teams , and they have five distinct groups in SonarQube.
I have read this thread (How to auto-apply a Permission template (with Project Key Pattern) - #7 by Denis ) and created a permission profile with a project key for TEAM one. In that permission profile, I assigned that group one must have full permission.
We built a project with bambo. It was created on SonarQube with no access for Group One! because I realized as long as the second permission profile is not set as default, it wont be triggered.
I set the second permission profile as the default for projects, and once we built the project with bamboo, it was created on SonarQube with the right permission for Group One . However, the issue is, if team two builds a project with bamboo, the project still receives permission from group one !!
In this case, what is the solution to having different permission profiles (5) with different key patterns and having them all be checked when a project is being built?
Colin
(Colin)
August 11, 2022, 11:03am
2
Hey there.
Most likely, your key pattern isn’t matching your project keys.
What key patterns are you trying to use, and what are the project keys you expect to match them?
openshift4
(open shift)
August 11, 2022, 11:49am
3
Hi Colin,
Thanks for your response.
As depicted in the figure, I set com.sonar* and what we set for the project key was com.sonarqube.vpt.forum
Colin
(Colin)
August 11, 2022, 11:51am
4
Thanks.
Regex101 tells me that those don’t match.
openshift4
(open shift)
August 11, 2022, 12:11pm
5
True , but in the link that i shared, someone from SonarQube mentioned it explicitly :
All above is still valid for cases when Name == Key. Which is our case.
Please advise of this.
Thanks.
" Note that my first test didn’t work. I used a bash pattern (com.sonar*
) rather than a valid regular expression (com.sonar.*
). "
However, if the expression was wrong, why then it worked when i made the second permission profile default?
I will try with " com.sonar.* " and see what happens without setting the permission profile default for all projects.
openshift4
(open shift)
August 12, 2022, 10:47am
6
thanks, the problem was with the regex.
it works and one can create as many as permission profiles with different project keys patterns.
system
(system)
Closed
August 19, 2022, 10:48am
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.