We have build pipeline in Azure DevOps that contains two jobs that build two projects from the same repo (angular frontend and java backend). Very much abbreviated the build pipeline looks like this. This build pipeline is also used for Build Validation policy on PRs.
trigger:
- develop
jobs:
- job: Backend
steps:
...
- task: SonarCloudPrepare@1
displayName: "Prepare analysis on SonarCloud"
inputs:
SonarCloud: OurProject
organization: ourorg
scannerMode: Other
extraProperties: |
sonar.exclusions=**/jalo/**,**/constants/**,**/*Standalone.java,**/_ui-src/**
sonar.projectKey=backendproj
sonar.projectName=xxxBackend
- task: Gradle@2
inputs:
sonarQubeRunAnalysis: true
- task: SonarCloudPublish@1
- job: Frontend
steps:
...
- task: SonarSource.sonarcloud.14d9cde6-c1da-4d55-aa01-2965cd301255.SonarCloudPrepare@1
displayName: "Prepare analysis on SonarCloud"
inputs:
SonarCloud: OurProj
organization: ourorg
scannerMode: CLI
configMode: manual
cliProjectKey: FrontendKey
cliProjectName: xxxFrontend
cliSources: "somepath"
extraProperties: |
sonar.exclusions=**/src/webApplicationInjector.js,**/node_modules/*
...
- task: SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
displayName: "Run Code Analysis"
- task: SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
displayName: "Publish Quality Gate Result"
When opening the build run by the PR we see these statuses:
But when opening the PR we see this:
When clicking the "Quality gate passed" it links to Frontpage Sonarcloud project, which in this case was successful.
Is it possible that both jobs are posting their statuses with the same name, i.e."SonarCloud/quality gate" and thereby is only the one finishing last being checked by the policy?