I’m struggling to find documentation around mono-repo support when running and managing SoanrQube yourself. We’ve tried adding the sonarqube.properties within each application within the monorepo directory but each time the specific application is run, the project is replaced with the latest application run. After reading online, I can see SonarCloud has support for mono-repo, but nothing when searching for SonarQube. I was wondering if anyone has any experience/can point me in the direction of documentation around mono-repo support when managing SonarQube yourselves.
What edition are you using? Explicit Monorepo support for PR decoration starts in Enterprise Edition($$).
But it sounds like you’re having trouble with a basic analysis? You say you’ve put a properties file in each application/directory. Does each application have a unique sonar.projectKey? Because that’s required for different applications to not overwrite each other.
Thanks for getting back to me. We’re currently using the community edition of sonarqube, version 10.1.
I’ve attempted to place sonar.projectKey in each directory of our monorepo, but I’m coming back with the following issue: You're not authorized to analyze this project or the project doesn't exist on SonarQube and you're not authorized to create it. Please contact an administrator. it seems I can only use the projectKey that is given to me during “Create Project” stage unless (and hopefully) I’m missing something?
You’re going about this the right way. The problem is permissions. If you created the first project / project-key through the onboarding, then the analysis token you got at that time is probably tied to only analyzing that first project. You should look into generating a user token or a global analysis token.