I know that there is no "new project" button on SonarQube UI. However, I have two branches of the same project that I want to do analysis on. The thing is that since the project names are the same, SonarQube will upload the analysis results of the two branches into the same project on SonarQube Server. How do I configure SonarQube so that one branch will upload analysis results to one project and the other branch will upload results to another project on SonarQube server?
Join Stack Overflow to learn, share knowledge, and build your career.
If you use SonarQube Runner, then you have to change the
sonar.projectKey property to different values. If you use maven based analyses, then add
-Dsonar.projectKey="Something" to your command. Example:
mvn sonar:sonar -Dsonar.projectKey="My project in first branch" mvn sonar:sonar -Dsonar.projectKey="My project in second branch"
You can change the project name in a similar way with the