SonarCloud - Bitbucket: Cannot see sonar cloud report on master pipeline

  • ALM used (Bitbucket Cloud)
  • CI system used (Bitbucket Cloud)
  • Scanner command used when applicable (private details masked)

script:

  • pipe: sonarsource/sonarcloud-scan:1.0.1
    variables:
    EXTRA_ARGS: “-Dsonar.typescript.lcov.reportPaths=coverage/lcov.info”
  • Languages of the repository: typescript
  • Steps to reproduce:
    I have defined pull-request pipeline and master pipeline. In both pipelines, I configure sonarcloud pipe as above. However, I can only see the report for the PR pipeline, not master pipeline. is this work-as-design ?

PR pipeline


You can see the “1 Report” here

Master pipeline (after we merge PR, master pipeline will run automatically)


There’s no report showed in master pipeline

In this link (Code Insights | Bitbucket Cloud | Atlassian Support), section " See the reports inside the pipeline, Point 3 has the destination branch as Master.

So I wonder how I can apply to my project.

Thanks,
Minh

Hi @ctminh,

Welcome to our community forum and thanks for your question.

Yes, this is by design.
At master level, SC reports in a widget , like this :

May I ask you, what is be your need to have those reports at master level? What would you like to see?

Thanks,

Hi Aurélie,
Thanks for the reply,

I’m curious why we didnt see the reports for master pipelines because we have the same config for PR and master pipelines.

I need to go the to SonarCloud page, select a project, and go to Activity tab to see the coverage for each pipeline run as image below


As you can see, for each master pipeline run, we have a report, and we need to select each one to see.
The SC reports at master level is only for the latest code.

It would be great if this report can be attached to the master pipeline in each run.

Thanks
Minh Chau

Hi @ctminh,

Actually master quality widget and PR quality are kind of different technically :slight_smile:
PR quality widget come automatically with PR analysis, while you need to enable the master quality widget on Bitbucket Cloud here:

Could you detail in which case(s) you need to see the coverage of past pipelines ?

Thanks