Fail gradle build if SonarQube 8.7 analysis fail

I just installed SonarQube 8.7 community edition. I use the gradle plugin “org.sonarqube” version “3.1.1”.
Is there a way to fail the gradle build if the SonarQube analysis fail to fulfil the quality gates?

Hi @niclasb ,

Welcome to SonarSource community! :sonarsource:

If you use Jenkins for CI, take a look at this post: How to Fail Jenkins Job from SonarQube Scanner if Quality Gate Fails? - #2 by Rebse

Thanks for your reply! I’m using bitbucket pipeline, calling our gradle build script.