Azure DevOps + GitHub and monorepo

Hello!
We are migrating our application to monorepo for the last few years. We are using AzureDevOps as CI/CD with source code located on GitHub. More than 100 SonarCloud projects belong to monorepo. Sometimes we have wrong results for Sonar checks inside PR, if there are few pipelines builds, PR will have results from the latest one. So if the first failed and the second is ok - PR will be ok, and that is wrong.

So we are researching monorepo approach on SonarCloud to fix that. But after reading the documentation and doing some tests, it turns out that it is not possible to activate monorepo support for an already existing project with code located on GitHub. Monorepo could be used for newly created projects or activated for existing projects if source code is located on AzureDevOps.

Based on our findings, I do have few questions:

  • Is this possible to migrate existing projects to monorepo support without recreating them in any way? Workarounds? By requests? We could not remove and create SonarCloud projects for each pipeline.
  • Will SonarCloud project with source code located on GitHub have a feature for adding an existing project to monorepo as it has for source code inside AzureDevOps?

Hi @vgubar ,
I’ll do my best to answer your questions :slight_smile:

Is this possible to migrate existing projects to monorepo support without recreating them in any way? Workarounds? By requests? We could not remove and create SonarCloud projects for each pipeline.

So far there is no way to migrate an existing SonarCloud project to a monorepo one. Though this is a limitation we already know about and may address…someday (sorry, no ETA for now). I will record your feedback and let you know in this thread when we will move forward on this topic :wink:

  • Will SonarCloud project with source code located on GitHub have a feature for adding an existing project to monorepo as it has for source code inside AzureDevOps?

From what I understand, Azure DevOps here is only the CI/CD tool. Though, you should import your project to SonarCloud from GitHub (authenticate via your GitHub account, not the Azure DevOps one).
Also, you may wonder if you can authenticate with your Azure DevOps account and import project hosted on GitHub and I can tell you that it’s not possible yet. Though, this feature is on our radar as well (and no ETA yet).

Hope to help :wink:
Kind regards,
Christophe - DevOps Platforms PM