We tried to add -Dproject.Name while running sonar command in gitlab ci-cd.yml
But still the project Name didnt change in sonarcloud UI level.
We can check the project name information only in background tasks show sonarscanner context
how to achieve this in sonarcloud?
with Sonarqube on premise it’s like that =
simply provide a new value for the
sonar.projectName property, which then
has an effect with the next analysis.
Should be the same for Sonarcloud.
Hello @ServiceAccount_Sonar and welcome to our Community!
Can you try using
-Dsonar.projectName instead, as described here?
I did try but didnt work as well.
Could you please go to your project at SonarCloud, Administration → Background Tasks. Then for the analysis task where you have added this property, click on the gear icon o the right and select “Show SonarScanner Context”. Please check that you have the property on the output, as this example below:
The property must be there for this to work and with this exact syntax:
as you mentioned at your first message).