0

We are using scripted build in our VSO environment and integrate with SonarQube, using the SonarQubePreBuild and SonarQubePostTest tasks. Especially since SonarQube version 5.2 we experience that builds are always succeeding as long as SonarQube succeeds in generating the report.

For VSO Git pre-commit policies we have configured pull requests to start a build including SonarQube analysis. However the configured Quality Profile is not met for the project, the build seems to succeed since SonarQube was able to do the actual analysis. ...But we want the build to fail....since quality conditions are not met.

We could add an additional custom (powershell) task to retrieve the results from the SonarQube instance, but what if we are running in preview mode and reports are not stored in the SonarQube database?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120

1 Answers1

0

Before 5.2 you could use the Build Breaker Plugin to have the build fail in VSO. But the Plugin is no longer compatible with 5.2 and is planned to be included in Sonar Core in 5.4.

See this question for details.

Community
  • 1
  • 1
Pascal Berger
  • 4,262
  • 2
  • 30
  • 54