Is there a way to define which quality profile will be associated when a new project is being created?

quality-profiles
sonarqube

(Jason Stanley) #1

Hello

SonarQube 6.7.2 Developer Edition

Is there a way to define which quality profile will be associated when a new project is being created?

I am using Jenkins and would like a way to add a parameter to define which quality profile the project uses.

Example:
If I have multiple Java quality profiles defined (JavaProfile1, JavaProfile2, JavaProfile3).

Is there a sonar properties parameter I can set, to define which profile to use for new projects?

Thanks
Jason


(Nicolas Bontoux) #2

Hi Jason,

Negative. If you don’t provision the project then the default Quality Profile will apply on first analysis. If you wish to specify a specific Quality Profile ahead of time, then the right approach is to first provision the project on SonarQube side. Note that such provisioning can also be scripted (if needed), using SonarQube WebAPI (documentation embedded in server).


(Jason Stanley) #3

Thanks Nicolas, I will look into that.