Quality Gates/Profiles change for Existing project in sonar

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    We are currently using SonarQube Enterprise version 9.9.6
  • how is SonarQube deployed: zip, Docker, Helm
    Docker
  • what are you trying to achieve – trying to change the quality gate for multiple projects which are currently on our sonar server
  • what have you tried so far to achieve this
    I see that one option is to manually go to each project and change the gate - But we have a lot of projects in there and technically its not feasible to go one by one and update the quality gate

What we are trying to achieve is a way to update idle way to update all the projects and assign them to a quality gates based on a tag or language

right now the projects are create using jenkins Maven.get() .option(sonarArgs) .goalsAndPhases('sonar:sonar') .option('--fail-at-end') .invoke()

Any options or sonar args which can be leveraged to start passing in the quality gate or a tag which can be associated to a profile internally

Hi,

Welcome to the community!

Quality Gates cannot be assigned via analysis parameters. Your best bet is to automate this using the 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.

 
HTH,
Ann