Apply Quality Gates Automatically for the specific Projects in SonarQube

Hi Team,

I am using Latest version of Community Edition of SonarQube 9.7, I have a question on custom quality gates that we can create and this can be applied to specific projects as below.

But I have a requirement to apply this custom quality gate automatically to specific projects automatically based on naming convention that project has or else in any other way.

or else from the CI pipeline can we check the specific quality gate status so that only that specific quality gates status can be pulled and can fail the pipeline.

Please help me out on this.


Hi Prasad,

There’s no regex to apply non-default Quality Gates at project permission the way there is for permission templates. You’ll need to do it after project creation, but you can script it with the Web APIs.

The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.

You may also find this guide helpful.