0

I just installed the latest version of sonarqube on my server and did a test run on my project with the sonar-scanner executable. This works.

In the next step, i'm creating a new VSTS Build Definition with the existing SonarQube build steps. VSTS Build Definition

When I trigger this build, it fails in the last step, after the report has been uploaded to my SonarQube server:

VSTS build log enter image description here

SonarQube server log enter image description here

I don't know why this happens, because the sonar-scanner is working just fine. I'm using the same parameters in my MS Build step.

Rob Angelier
  • 2,335
  • 16
  • 29

1 Answers1

1

Looks like your VSTS task is pending completion of the Background Task on SonarQube server side, as per this log in your first screenshot:

Waiting on the sonarqube server to finish processing in order to determine the quality gate status

(note: this is a log from the VSTS task itself, not from the SonarQube Scanner which did finish successfully)

The problem is that the Background Task actually fails with an error as per your second screenshot. The failure corresponds to bug SONAR-8013 (fix to be released in upcoming SonarQube 6.1).

Nicolas B.
  • 7,245
  • 17
  • 29
  • Ah ok, thanks for your answer. I've been spending two days on this issue right now. I opted the "Fail build on quality qate status" out in the build step, but it's still waiting for this. – Rob Angelier Sep 16 '16 at 08:19
  • Nope. Release Candidate for 6.1 is literally around the corner, watch out for the announcement [here](https://groups.google.com/forum/#!forum/sonarqube). – Nicolas B. Sep 16 '16 at 08:28
  • ok, well i'm trying to create a work-around by including the sonar-scanner.bat in my project and execute a CMD Task step from my build. Hope that works. – Rob Angelier Sep 16 '16 at 09:36
  • I fixed it for now by including the sonar-scanner.bat file into my project and execute it by using the CMD build step. Just tested and it works. – Rob Angelier Sep 16 '16 at 11:10