Sonar Cloud Quality Gate not showing up under Status Checks in Azure DevOps Branch Policies

Template for a good new topic, formatted with Markdown:

  • ALM used: Azure DevOps
  • CI system used : Azure DevOps
  • Scanner command used when applicable (private details masked)
  • Languages of the repository
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
    Sonar Cloud Quality Gate not showing up under Status Checks in Azure DevOps Branch Policies
  • Steps to reproduce
- task: SonarCloudPrepare@1
  displayName: Prepare Sonar
  inputs:
    SonarCloud: 'ado-sonarcloud'
    organization: 'ado-sonarcloud'
    scannerMode: 'CLI'
    configMode: 'file'
    configFile: '$(Agent.BuildDirectory)/codeBase/sonar-project.properties'
- task: SonarCloudAnalyze@1
  displayName: Run Sonar
- task: SonarCloudPublish@1
  displayName: Publish Sonar Results
  inputs:
    pollingTimeoutSec: '300'
  • Potential workaround

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

Analysis ID: https://sonarcloud.io/api/ce/task?id=AY9zR65eMc-UNlZqxnKX

Hi,

Can you share the analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Ann