AzureDevOps Status policy on 2 builds

I’m using SonarQube version Developer Edition connected to AzureDevops 2019 Update 1 RC.
Actually, in each PR I have well-configured integration between build, status policy and quality gate.

I have an issue on another project when I configure to execute 2 builds policies at PR level, then I want to have 2 status policies reported but I see only one into the dropdown list. During the execution of the build the last that publish the result on SonarQube it’s the one the will report the Quality status check (then if one fails first will be not visible at PR level).

I am in touch with Microsoft support and they replied that there is an issue on PR decorator on SonarQube.

I did further research and lab setup on this ask using sonar cloud also. Pull Request decoration is the one which is responsible to push the status to Azure DevOps. This setting is done at the Sonar side and there is no option at the Azure DevOps side to control the name Status policy name.

Also, I don’t see an option at the sonar side to change it for each build analyzed as PR decoration is at sonar organization setting level.

In this link it is mentioned:

The Publish Quality Gate Result task waits for the analysis report to be consumed by the SonarQube in order to flag the build job with the Quality Gate status.

Could you please reconfirm that can be changed?


For the moment, only one status per Pull Request can be posted. This is mainly due to the fact that multiple analyses for a single SC / SQ project is not yet supported (this is in our roadmap, but no ETA yet). So then the last analysis done wins over the previous one and overwrites it.

The Publish Quality Gate Result task is intended to post a report of the Quality Gate in the build summary only, it has nothing related to Pull Request decoration nor any Quality Gate status that is displayed in the right pane of them.


Yes it’s reported in the build summary, but the only stuff it will be to change the name posted to the Status Policy (instead SonarQube/quality gate).

This name is deduced in our engine, so it canno’t be changed by users.

If you want to change the display name, then you can do it at the bottom of the pane you shown just above.


Can you send me the link of the User Story related to it?

“Multiple analyses for a single SC / SQ project is not yet supported”


Yes, there you are :

1 Like

Hello @mickaelcaro! There are some news on this issue?