Question on SonarQube Quality Gates

Hi Team,

I have a question on SonarQube Quality Gates (default built in Gates) Sonar Way (BUILT IN). For Quality Gates to work on the scanned code repo, these gate automatically applied on the results? Do we need to use waitForQualityGate() function in the pipeline code to check the Quality gates even for the default gates?

We are using SonarQube Community Edition 9.2.3 version.
Thanks,
Prasad.

Hi Prasad,

Quality Gates are always, automatically applied. You only need to waitForQualityGate() if you want your CI updated with the Quality Gate status.

 
HTH,
Ann

Hi Ann,

Can we fail the pipeline without using waitForQualityGate() function?

Because I want to fail the pipeline automatically.

Thanks,
Prasad.

Hi Prasad,

If you want to fail the pipeline, then you’ll need to waitForQualityGate.

 
HTH,
Ann