JetBrains / TeamCity.SonarQubePlugin

A plugin for TeamCity server allowing you to configure and run SonarQube analysis from the CI
Apache License 2.0
53 stars 32 forks source link

SonarScanner for MSBuild: finish analysis fails due to inability to specify a working directory #51

Closed KellyR-STCU closed 6 years ago

KellyR-STCU commented 6 years ago

I was testing out the updated version of this plugin with MSBuild today and there is a problem when specifying a working directory in the initial scan step:

SonarScanner for MSBuild: begin analysis (5s) in directory: C:\buildAgent\work\ea436c88452306fe\src

SonarScanner for MSBuild: finish analysis Starting: C:\buildAgent\tools\sonar-scanner-msbuild.4.0.2.892\MSBuild.SonarQube.Runner.exe end in directory: C:\buildAgent\work\ea436c88452306fe

The result:

Temporary analysis directory (usually .sonarqube) doesn't exist. The "begin" step was probably not executed. Post-processing failed. Exit code: 1

We need to be able to specify the working directory in the end step as well.

KellyR-STCU commented 6 years ago

@Linfar Any idea if you might be able to take a look at this?

Linfar commented 6 years ago

I'll check it and fix when possible. Meanwhile you can try using default working directory and use "sonar.projectBaseDir" additional parameter.

Linfar commented 6 years ago

The fix was simple so I've integrated it to both version (10.0.x and 2017.1.x)

KellyR-STCU commented 6 years ago

Thank you!!

KellyR-STCU commented 6 years ago

@Linfar After updating, I am not seeing the Working Directory exposed to be configured in the SonarScanner for MSBuild: finish analysis step in TeamCity.

Is this supposed to just work automatically?

capture

After looking again I see it is not yet on the master branch. Maybe i need to take the file from the other branch

Linfar commented 6 years ago

Yes, working directory for finish step will be used from begin step

чт, 12 июл. 2018 г., 21:36 KellyR-STCU notifications@github.com:

@Linfar https://github.com/Linfar After updating, I am not seeing the Working Directory exposed to be configured in the SonarScanner for MSBuild: finish analysis step in TeamCity.

Is this supposed to just work automatically?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JetBrains/TeamCity.SonarQubePlugin/issues/51#issuecomment-404609157, or mute the thread https://github.com/notifications/unsubscribe-auth/AETt8Dx98qxJNSXfZf_ku5qCV4Qy-rh1ks5uF5cbgaJpZM4VGJm6 .