How to bring sonar scan results as PR comments from dotnet-sonarscanner in docker?

We are using “dotnet-sonarscanner” for SonarQube analysis of .net6 projects as part of azure pipeline. Build, unit tests and sonar scanning (dotnet-sonarscanner begin/end) are all run from within a docker container.

Is it possible to get Sonarscan findings as PR comments in this configuration?

SonarQube is a local network install of the Enterprise Edition, v9.8.

Thanks!

Hi,

Welcome to the community!

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

9.8 → 9.9.3 → 10.3 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your question, the docs cover what’s available in current versions.

 
HTH,
Ann

Thanks for the heads up! We have scheduled for the upgrade within the next couple of weeks.

My question regarding PR integration basically boils down to whether SonarQube supports PR integration when the scanning is performed within a Docker container, or is it necessary to execute SonarQube step on the pipeline agent itself as part of the pipeline run? Could you please confirm that?

Thanks!

Hi,

I don’t see any reason it wouldn’t work from Docker. We even offer a Docker version of the SonarScanner CLI.

 
HTH,
Ann