GitLab comments not being posted in MR

I have a problem with GitLab MRs being scanned: status comments are not being posted.

  • I have set both SONAR_TOKEN and SONAR_HOST_URL
  • The code and coverage is correctly being scanned and uploaded
  • No errors or warnings in the scan log

Any idea what could be the issue?

Hi Niek,

Sorry for the delay. Can you give us the details of your organization and project?

I figured out the issue - the cache needs to be provided. Otherwise the MRs will be analysed, but only the branches and no comments will be posted in the MR. So the fix was to add this:

    key: "${CI_JOB_NAME}"
      - .sonar/cache

Glad you figured it out, and thanks for posting the solution!

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