To configure a project in SonarQube, is there a way to specify the DevOps Platform Integration properties for the project thru a properties file? You can set the properties in the SonarQube UI, but for 100’s of projects, I want a more efficient way to set the properties for each project.
I’m talking about these DevOps Platform Integration properties that are under the General Settings for a project:
- Configuration name
- Project name
- Repository name
Both configuration name and project name will be the same for my projects, but the Repository name property will be unique for each project. What is a better way other than thru the SonarQube UI to set these properties?
Welcome to the community!
While project name is settable via analysis properties (
sonar.projectName), the other two values aren’t settable as part of your analysis, because by the time PR decoration happens, analysis properties are out of scope.
It should be possible to set them via web services though, once the projects are created in SonarQube.
The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.
You may also find this guide helpful.
Hi @jperaza and thank you for your contribution
As of today, as @ganncamp explained you, there is no such mecanism in our products.
However, this is something actually under consideration. Please do not hesitate to vote for it on our Portal : Project-Level DevOps Platform Configuration
Christophe - DevOps Platforms PM