SonarCloud/ quality gate stuck on "waiting" on 1 of 2 repos

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps
  • Languages of the repository : Front-end - Javascript/Typescript (React), Back-end - C#/.net
  • What am I trying to achieve? : I am trying to confirm that sonarcloud is reporting in my front end repo in azure devops without issue (details below)

Hi All - Sorry in advance for my lack of knowledge as I am new to Azure Devops and SonarCloud.

As per the above, I’ve got two repo’s under the same project on azure devops I am working on currently, one for the front-end and one for the back-end. I am trying to confirm that sonarcloud is scanning my code correctly whenever a pull request is created in each repo but I am getting the below from my front-end repo whenever it has a pull request made from a branch.


I’ve confirmed that SonarCloud is reporting the results in my back-end pull requests without issue so I am getting a little stuck as to where I might be going wrong with it. I’ve currently got my yaml file for the front end set to to the following (private replaced with test project)

- main

  vmImageName: 'ubuntu-20.04'

  - stage: ci
    displayName: 'CI'
      - job: Build
        displayName: Build
          vmImage: $(vmImageName)

          - task: UseNode@1
            displayName: 'Use Node 16x'
              version: 16.x

          - task: YarnInstaller@3
            displayName: 'install yarn'
              versionSpec: '1.x'
              checkLatest: true

          - task: Yarn@3
            displayName: 'install modules'
              arguments: 'install'

          - task: SonarCloudPrepare@1
            displayName: 'Prepare analysis on SonarCloud'
              SonarCloud: 'SonarCloud'
              organization: 'TestOrg'
              scannerMode: CLI
              configMode: 'file'
              configFile: ''
              projectKey: 'TestKey'
              projectName: 'TestProject'
              cliSources: '.'

          - task: Yarn@3
            displayName: 'test and collect coverage'
              arguments: 'vitest run --coverage'

          - task: SonarCloudAnalyze@1
            displayName: 'Run Code Analysis'

          - task: SonarCloudPublish@1
            displayName: Publish Quality Gate Result
              pollingTimeoutSec: '300'

          - task: Yarn@3
            displayName: 'build application'
              arguments: 'build'

  - stage: dockerbuild
    displayName: 'DockerBuild'
      - ci
    condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
      - job: DockerBuild
        displayName: 'Build'
          vmImage: ubuntu-latest
        - task: Docker@2
            containerRegistry: 'TestProjectDockerRegistry'
            repository: 'frontend'
            command: 'buildAndPush'
            Dockerfile: '**/Dockerfile'
            tags: '$(Build.BuildNumber)'

I will note that the pull requests do have a slight difference when viewing sonarcloud dashboard - see below for example.

I’ve checked other posts on the forms and doesn’t seem to be a PAT issue since the back end works fine so I am little stumped as to what is going wrong.

Any help would be appreciated :slight_smile:

Hey there.

Just to make sure I’m following – the difference you’re pointing out is the little Azure DevOps symbol next to the Quality Gate check? Or something else?

Yes - the little azure symbol, when I click it I am taken to the back-end pull request but the icon doesn’t appear for the front-end pull request.

Thanks. And is the project itself bound?

Hi Colin,

Both projects in sonarcloud are currently bound to Azure Devops.

Thanks. I’ve reached out via a private message for some additional information.

Did you get this resolved? I have the same issue. See my issue described here: