Quality Gate is not working as expected for Mono Repo PR in Bitbucket

Template for a good new topic, formatted with Markdown:

  • ALM used (Bitbucket Cloud)
  • CI system used (Bitbucket Cloud)
  • Scanner command used for Pull Request Pipelines
  • Languages of the repository: Javascript
  • Steps to reproduce
    • Have a mono repo configured in SonarCloud and multiple projects bound to the mono repos
    • In bitbucket, the mono repo includes the all projects
    • Apply quality gate feature for the mono repo in bitbucket pipeline
    • When an PR pipeline of the mono repo is completed in bitbucket pipeline, the pipeline does code analysis for some projects in the mono repos and are reported in PR analysis in SonarCloud, there are 1 project failed Quality Gate and reported in SonarCloud. However, in bitbucket PR, it is reported as Quality Gate passed, and was linked to the latest analysis result (which was passed)

Question: For Quality Gate and Bitbucket PR integration, could we support Quality Gate checks for all projects analyzed in mono repository?

Hey there.

I tried this out on my end and was able to get a PR with two Quality Gates reported on a PR after configuring my projects as a monorepo.

Have you checked that the appropriate SonarQube Cloud projects are bound to your repo? You can check this in your Bitbucket repository settings.

You’ll need to make sure that all of these projects have been analyzed in the context of your PR.

If you’re still stuck, I suggest sharing your full bitbucket-pipelines.yml file.