Quality Gate Branch Status Policy Missing in Azure Devops Server

Environment:
*SonarQube Developer Edition 9.0.0.45539 (on-premise)
*Azure Devops Server Version: 2020 update 1 (on-premise)

I am trying to block a merge into the master branch with a quality gateway status policy. ALM Integrations has been set up and shows that I’m connected to the server.

image

I have a project in a simple application that I’ve built and set up as a proper SonarQube project. It’s reporting in SonarQube as passed.

I am attempting to set up a branch policy in the master branch and when I add a status check the dropdown list for the status to check is empty.

I’ve tried adding “SonarCloud/quality gate” as the status to check but this is never set despite the SonarQube build being successful and the Quality Gate showing green on SonarQube server. The pull request condition is never satisfied.

image

What steps am I missing? I’ve gone through all of the documentation and help videos I can find and this just works for everyone else.

I believe I found the answer. I changed “SonarCloud/quality gate” to “SonarQube/quality gate”

image

The merge was successful and passed the build and quality gate test.

It would be helpful to note in the documentation that the dropdown does not show anything if you haven’t completed a merge before. :slightly_smiling_face:

2 Likes