I have a project in Gitlab with the following script in the .yml file which is running on MR only - sonar-scanner -Dsonar.host.url="$SONAR_BASE_URL" -Dsonar.login="$SONAR_LOGIN_TOKEN" -Dsonar.coverageReportPaths=sonarqube-generic-coverage.xml -Dsonar.pullrequest.key="${CI_MERGE_REQUEST_IID}" -Dsonar.pullrequest.base="${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" -Dsonar.pullrequest.branch="${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
when I run it, I get this warning in sonarcloud:
Pull request decoration did not happen. Property 'sonar.pullrequest.provider' was missing.
And following other threads in this community I canât see the option of gitlab in the list of providers when I go to the settings of my project. Image attached
Unfortunately, it is currently not possible to link the existing project. You would have to re-create it. You can do this by clicking â+â icon on top-right side of the screen and selecting existing project from the list as seen here (projects annotated with GitLab logo):
Thanks @Marcin_Majewski I just imported a new repository and I have the icon which is good, but I ran an analysis from a MR and despite everything looks fine in sonarcloud, I donât see the results printed in my MR
Iâm afraid I canât tell you because I didnât create that token and I donât have access to it but Iâm trying to update the token to confirm if thatâs the problem but I get this error when I try to update the token
Yes, you are doing it in the right place. Sorry, I was not clear enough in my previous post.
How do you generate the token? Do you generate this token yourself? In other words: when you are logged in GitLab and generate the token, you are logged in the same way as you are logged in the SonarCloud?
Problem has been solved in the private thread. There were two problems: token was invalid and user was not a member of the group that was imported in SonarCloud.