I just on-boarded a new organization, imported the project, added SonarCloud tasks to the azure pipeline, yet the quality gate is still not getting computed for the main branch after days of pushing new commits, though the New Code definition is set to ‘Previous version’ right off the bat.
Usually after importing a project and re-running the analysis on the main branch a 2nd time the quality gate already gets computed. At least that’s how it worked with another organization i’ve onboarded a year ago.
I’ve pretty much used the same SonarCloudPrepare task configuration so I’m not sure what I’m doing wrong.
stages: - stage: Build jobs: - job: Job1 displayName: 'Build and publish output' steps: - task: SonarCloudPrepare@1 inputs: SonarCloud: 'SonarCloud' organization: '***' scannerMode: 'CLI' configMode: 'manual' cliProjectKey: '***' cliProjectName: '***' cliSources: '$(build.sourcesDirectory)' - task: UseDotNet@2 displayName: 'Install .NET 6.0 SDK' inputs: packageType: 'sdk' version: '6.0.x' includePreviewVersions: true performMultiLevelLookup: true - task: DotNetCoreCLI@2 displayName: 'Restore packages' inputs: command: 'restore' projects: '***' restoreArguments: '--runtime linux-x64' feedsToUse: 'select' vstsFeed: ''***' - task: DotNetCoreCLI@2 displayName: 'Build and publish output' inputs: command: 'publish' publishWebProjects: false projects: '***' arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/$(Build.BuildId)' modifyOutputPath: false - task: PublishBuildArtifacts@1 displayName: 'Publish artifact' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId)' ArtifactName: 'drop' publishLocation: 'Container' - task: SonarCloudAnalyze@1 - task: SonarCloudPublish@1 inputs: pollingTimeoutSec: '300'