We are using SonarCloud tasks in Azure Pipeline to create and analyze our repositories.
While creating a new project and tried to analyze it, the SonarCloudPublish task returned a
##[error]ERROR: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to
We invested a lot of time in this issue until we tried to create manually the project in SonarCloud. There, we got the following message: Could not create Project, key already exist: app-service
Based on the following topic, it seems that the project keys are global to Sonarloud and not on an organisation scope.
Why I open that ticket:
-
While the errors are both relevant, the first that we got is misleading. Is there any chance to make it more clear for future case?
-
Being limited in the projects that we can create is a pain as this might hit us late in the project creation process. Is there any plans on making the project keys unique at an organisation level?