Automatic assignment of non default Quality Profiles by project namespace


(Gilbert Rebhan) #1

Hi,
we have f.e. several Java related Quality Profiles, but only one of them is set as Default.
If you don’t want to use the default one, you have to use the Sonarqube web api within a provisioning process (create Git Repos, create Jenkinsjobs, create Sonarqube projects …) or within your build.

The teams that provide the provisioning tools or write their own build scripts don’t have Sonarqube skills and we as Sonarqube admins don’t want to be involved in configuring every provisioning and build process. As the builds are running with a special user that has admins rights in Sonarqube, the project is created with the first scan - so that does not have be a part of a provisioning process.
BUT we must adapt the Quality Profile everytime, if we want to use another one as the default.

What is missing is a possibility to combine a project namespace with specific Quality Profiles, similar to permission templates with regex.
e.g. all projects with the namespace

de.foo.openshift

should use all existing

.+ Openshift QualityProfiles

, means use Foo Java Openshift / Foo Javascript Openshift … etc.
If their is no .+ Openshift Quality profile for a language, the Default Quality Profile for this scanner is used.
That would make it a lot easier.

Regards,
Gilbert