Gitlab MRs sonarqube comment

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

SonarQube 9.8

dockerhub/sonarsource/sonar-scanner-cli:latest with digest dockerhub/sonarsource/sonar-scanner-cli@sha256:5b611ec4da52e96706c4adeb6c28e259d5abd080752e8b714dfd839f2b47d833

  • how is SonarQube deployed: zip, Docker, Helm


  • what are you trying to achieve

When I create a MR in gitlab the pipeline is being executed. After the pipeline completes, sonarqube adds a comment into a MR discussion.

I want this behavior on all of my projects. For some reason some projects don’t get this comment.

  • what have you tried so far to achieve this

I’ve tried to compare .gitlab-ci.yml files from two different projects. I didn’t spot any inconsistencies. I’ve also checked the branches in sonarqube and they look the same in these two projects. Main branch is develop and that is our company policy among all repositories.


For the projects where this doesn’t appear, were they created in SonarQube via the onboarding wizard, or in some other way?

For the lacking projects, are the Project Settings → General Settings → DevOps Platform Integration details filled in?

:warning: As a side note, make sure you upgrade to SonarQube v9.9 LTS soon, not only to benefit from our Best LTS Ever™, but because soon we will systematically ask users to upgrade when they ask questions about earlier versions of SonarQube, which are now considered unsupported. :smiley:


Yes! DevOps Platform Integration details were missing. After filling the project_id and running the pipeline in gitlab the comment appeared.

And yes, we are planning to upgrade to 9.9 in the near future.

Thanks for your help.

1 Like

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