ALM used: GitHub
CI system used: Circle CI
Scanner command used when applicable (private details masked): We are using the Sonarcloud orb
Languages of the repository: Typescript
Error observed (wrap logs/code around with triple quotes ``` for proper formatting):
ERROR: Error during SonarQube Scanner execution
ERROR: You must define the following mandatory properties for ‘Unknown’: sonar.projectKey, sonar.organization
Steps to reproduce:
- Have a Github monorepo consisting of two packages (RepoA with ProjectA and ProjectB)
- In SonarCloud, import the repo as a monorepo creating two projects (org_RepoA_ProjectA and org_RepoA_ProjectB)
- Configure the sonar-project.properties for both files, adding the sonar.projectKey and sonar.organization to both of them
- Configure circle.yml, using the orb
- Execute the pipeline
Currently, following step by step the documentation, we get the error I wrote above.
Our issue is that right now it seems that when the CircleCI pipeline executes, the orb does not seem to be reading the sonar-project.properties files inside each project.
Are we missing something? Do we need to add an extra command or something in the circleci yml to let the orb know where to get the sonar-project.properties file?
We even tried adding the monorepo itself as one of the projects to add a sonar-project.properties file with the node.modules added to specify the route to each project, and did not work either.
I don’t know if I am explaining myself, but hopefully we can get some help.
It’s the same issue as in here: Monorepo in circleCI failing to find SC config
The difference is our config.yml for CircleCI is on the root of the repo, not inside each project.