Adding new projects into existing monorepo through CI

  • ALM used: Azure DevOps
  • CI system used: Azure DevOps

Hie,

Would like to know if there is a way to add new projects into an existing monorepo setup through CI.

Current scenario:

  1. Developer adds a new project folder(test-app) into an existing repository that is already setup as a monorepo in SonarCloud

  2. Developer runs the CI pipeline and “test-app” is being created automatically as a normal project in SonarCloud

  3. I will need to delete this project and set it up again within the existing monorepo and rerun the CI pipeline to get proper monorepo decorations on Azure Devops platform

Hey there.

You’re right – this isn’t ideal.

If you want to prevent projects from being automatically created, you could consider removing the Create Projects permission from the user for which the token used for analysis was generated. This would probably require that you have a technical user (with Execute Analysis permissions) that you provision analysis tokens with

Otherwise, the only way to add a project to an existing monorepo is through the UI. There’s no analysis parameter that can be set to do the job.

If you think something should change here, I’d encourage you to post in the following category (or I can move your post):

Thanks Colin,

Definitely a much needed enhancement. Can you move it for me please?

HI Team,

It’s almost a year from my request, is there an API to create monorepo through CI today?