Pull request quality gate note working (Azure Devops DotNet)

Azure DevOps

sonar.qualitygate.wait=true
sonar.qualitygate.timeout=300
* Languages of the repository DotNet Core

##[debug][SQ] Branch and PR parameters: {"sonar.pullrequest.key":"1269","sonar.pullrequest.base":"main","sonar.pullrequest.branch":"test/sonar","sonar.pullrequest.provider":"vsts","sonar.pullrequest.vsts.instanceUrl":"[https://dev.azure.com/********/","sonar.pullrequest.vsts.project":"*********","sonar.pullrequest.vsts.repository":"*******","sonar.scanner.metadataFilePath":"/home/vsts/work/_temp/sonar/20230421.1/5831484f-60b8-1f60-f538-a0cc891cd347/report-task.txt"}](https://dev.azure.com/*****-it/%22,%22sonar.pullrequest.vsts.project%22:%***********%22,%22sonar.pullrequest.vsts.repository%22:%22**********%22,%22sonar.scanner.metadataFilePath%22:%22/home/vsts/work/_temp/sonar/20230421.1/5831484f-60b8-1f60-f538-a0cc891cd347/report-task.txt%22%7D)

##[debug]extraProperties=sonar.qualitygate.wait=true

sonar.qualitygate.timeout=300

sonar.cs.opencover.reportsPaths=/home/vsts/work/1/s/src/********/API/**/*.opencover.xml

sonar.pullrequest.provider=vsts

sonar.pullrequest.vsts.token.secured=***

sonar.coverage.exclusions=**/DependencyRegistration.cs,**/Startup.cs

##[debug]set SONARQUBE_SCANNER_MODE=MSBuild

##[debug]Processed: ##vso[task.setvariable variable=SONARQUBE_SCANNER_MODE;isOutput=false;issecret=false;]MSBuild

##[debug]set SONARQUBE_ENDPOINT=********

##[debug]Processed: ##vso[task.setvariable variable=SONARQUBE_ENDPOINT;isOutput=false;issecret=true;]***

##[debug]set SONARQUBE_SCANNER_PARAMS={"sonar.host.url":"[https://sonarcloud.io/","sonar.login":***,"sonar.organization":"*******","sonar.projectKey":"******i","sonar.projectName":"acp](https://sonarcloud.io/%22,%22sonar.login%22:***,%22sonar.organization%22:%**********---%22,%22sonar.projectKey%22:%22********-api%22,%22sonar.projectName%22:%22acp) / *******-api","sonar.projectVersion":"1.0","sonar.pullrequest.key":"1269","sonar.pullrequest.base":"main","sonar.pullrequest.branch":"test/sonar","sonar.pullrequest.provider":"vsts","sonar.pullrequest.vsts.instanceUrl":"[https://dev.azure.com/********/","sonar.pullrequest.vsts.project":"***-*****","sonar.pullrequest.vsts.repository":"**********","sonar.scanner.metadataFilePath":"/home/vsts/wor**

##[debug]which 'dotnet' 

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hey there.

Based on the logs shared, I don’t know what’s not working (there’s no error in the logs). Can you please provide some more details? Pasting logs without context is not conducive to problem solving.

The context is: For no known reason the quality gate isn’t working in sonarcloud. When an Azure devops pipeline runs with sonar cloud scan, it isn’t recorded in sonarcloud.io and if a known quality issue is introduced to the code being scanned, the pipeline doesn’t fail.

Thanks. Can you share how your Azure DevOps Pipeline is configured, and the logs from a build where Sonarqube analysis is run?