Build breaker for .Net Core sonar cloud analysis with Azure DevOps

Hello,

We are using sonarcloud to analyze .net core projects with Azure DevOps.

Tasks in the pipeline:

  • task: CmdLine@2
    displayName: Dotnet sonarscanner start
    inputs:
    script: |
    echo Dotnet sonarscanner start
    dotnet “SonarScanner.MSBuild.dll” begin /k:"" /o:"" /d:sonar.host.url=“https://sonarcloud.io” /d:sonar.login=""

  • Task to execute .net core build

  • task: CmdLine@2
    displayName: Dotnet sonarscanner end
    inputs:
    script: |
    echo Dotnet sonarscanner end
    dotnet “$(Build.SourcesDirectory)\Tools\Sonarqube\SonarScanner.MSBuild.dll” end

Need inputs on how can we implement build breaker feature in our pipeline with the plugin available in marketplace: https://marketplace.visualstudio.com/items?itemName=SimondeLang.sonarcloud-buildbreaker

We are not affiliated with that plugin, so our ability to help is limited.

The documentation looks pretty clear: you need to add a build breaker step at the end of the pipeline. In the YAML editor, you can search for “build breaker”, and fill in the parameters (SonarCloud endpoint, and your organization), and the assistant will add an appropriate task entry.

I hope this helps!

Thank you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.