Support for monorepo

  • SonarQube Developer edition, version 10.1
  • how is SonarQube deployed: zip
  • what are you trying to achieve: support monorepo
  • what have you tried so far to achieve this:
    ** adding a new project in SonarQube for other projects in the same repo

Hi,

We have a monorepo, where it has multiple .NET projects in the same repository in bitbucket (on-prem).

Each separate projects gets built, scanned by SonarQube in Jenkins.

We noticed that the scan result of the project will overwrite the result of other projects in SonarQube.

Reading through below:

and with other researches, it did not explain how exactly to add support for monorepo in SonarQube.

When we try to add a new project in SonarQube for other code projects, it will not allow us to do so as it says it’s already setup for the repository.

It now begs the question: how to add the support for multiple code projects in the same bitbucket repository in SonarQube?

Hi,

Monorepo support in PRs starts in Enterprise Edition($$). Are you using that?

For your project analysis overwrite, it sounds like you’re not passing a unique sonar.projectKey value for each project.

 
Ann

Right, unfortunately we are using Developer Edition.

So, for our case, will splitting the monorepo into dedicated repos the only solution?

Hi,

If you want PR analysis, then yes your options are splitting up the monorepo or upgrading to Enterprise Edition.

 
Ann

Got it, thx for the confirmation.