0

We are using Jenkins to run our SonarQube analysis on each of our repos. How can i specify each repo build as a sub-project of our overall team 'ProjectA'?

Currently i have tried this (when building the subProjectX repo):

SonarQube.Scanner.MSBuild.exe begin /k:ProjectA /n:\"Project A\" /d:ProjectA.sonar.modules=subProjectX,subProjectY /d:subProjectX.sonar.projectName=$subProjectX /d:$subProjectX.sonar.projectVersion=${majorVersion}.${minorVersion} /d:sonar.host.url=\"${SONAR_HOST_URL}\" /d:sonar.login=\"${SONAR_AUTH_TOKEN}\""

I've removed of the settings - unit test filenames etc for clarity.

I find that this just creates a ProjectA project in SonarQube with analysis data for subProjectX. Then when I run a similar command for subProjectY it simply overwrites the subProjectX data in SonarQube.

I was expecting SonarQube to show the aggregate data in the ProjectA analysis, and also show the data for the sub-projects separately. Is this even possible in SonarQube?

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
Pete Whitehead
  • 178
  • 2
  • 11
  • Can you explain why you define the extra parameters (/d) as you did? Where did you find the documentation regarding this setup? Always mention the SonarQube and plugin versions you use. – Jeroen Heier Jul 31 '17 at 15:06
  • I was using the /d based on various stackoverflow questions like https://stackoverflow.com/questions/44761224/how-do-i-give-parameters-to-sonarqube-scanner-msbuild-exe Essentially I'm guessing. The SonarQube version is Version 6.4 (build 25310) – Pete Whitehead Aug 01 '17 at 08:38

0 Answers0