Integrate BitBucket Cloud with SonarQube

  • SonarQube 7.9.1 Developer Edition

  • I’m when to know if Quality Gates are passed before merging a PL to master in Bitbucket Cloud. Ideally also prevent merging onless passed

I’m evaluating SonarQube and SonarCloud.
Ideally I want to run SonarQube, but it’s not an absolute requirement.

I’m using TeamCity (OnPremise) to trigger MSBuild SonarScanner, and using BitBucket Cloud, and Jira Software Cloud.

I’ve looked at different plugins.
SonarSource have a BitBucket plugin, but for some reason it’s only for SonarCloud, not SonarQube.

I’ve also looked at Mibex Software “Sonar for Bitbucket Cloud” but it looks like the project is abandoned and since SonarQube 7.7 removed a feature, that this and all similar plugins require (analysis.mode parameter).

So, is there currently any method to get QG info from Sonar to BitBucket Cloud?
Ideally as a reall plugin, with UI support and/or with support for pipelie/build status.
Optional just as a PL comment

Also optional: let TeamCity fail the build, and then TeamCity will be responsible for reporting build status to BitBucket Cloud. I’ve looket into this as weel, bun it looks like the feature is removed in Sonar 6.x and newer, since the SonarScanner no longer knows about the quality gate, and the SonarScanner will not output/fail the build based on QG

Hi,

Your best bet is to use a webhook to send the QG status from SonarQube once analysis is complete.

 
HTH,
Ann