2

The company I work on recently purchased SonarQube Enterprise to improve code quality throughout all repositories. I found out that there is a feature that enables SonarQube to comment automatically on PRs targeting a specific branch, and I successfully managed to try that out.

Thing is:

  1. That configuration is not scalable: I would need to manually configure every repo to follow that rule

  2. That configuration needs a build pipeline to be defined "old school" on Azure DevOps to work, and we are moving into Pipeline as Code, starting of course with CI (where this takes place)

Anyone managed to get the PR commenting working in that scenario? Or, at least, solving the #1 problem?

Cheers

Lucas Mundim
  • 66
  • 1
  • 4

1 Answers1

0
  1. You can use REST APIs to do whatever configuration you need to do across your repositories. Refer to the REST API documentation.

  2. Shouldn't matter, although I haven't tested it. The SonarQube tasks aren't aware of whether the build source is YAML or visual designer/classic/JSON builds. The underlying tasks and job running architecture is the same. As long as the build is hooked up to a branch policy, it should still work.

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
  • 1. Up until this moment we are using the community maintained Sonarqube AzDevOps extension, not explicitly using its API 2. It matters since within the tutorial in the link it shows me a drop down of created CI Pipelines to chose from – Lucas Mundim Mar 24 '20 at 13:37