Hi,
We noticed a change in behavior in the BitBucket Cloud integration and Sonar Cloud: We used to get 3 builds for our pull-requests in BitBucket: One for the branch, one for the pull-request, and a third for the Quality Gate (this one was provided by the integration). Since a few days, we no longer see the Quality Gate build result in BitBucket. We used this feature to prevent developers from merging a pull-request when the quality criteria were not met.
In order to have our Gradle build fail when the quality-gate status fails, we developed a small plugin:
https://github.com/team-carepay/sonar-qualitygate
The only thing you need to do is simply include the plugin:
plugins {
id 'org.sonarqube' version '3.2.0'
id 'com.carepay.sonar-qualitygate' version '0.0.5'
}
The plugin will run after the sonar task, and will wait for the analysis to be completed. When the quality gate fails, the build also fails.
Would be nice to see support for sonar.qualitygate.wait=true
in the Gradle embedded scanner.