Set up Bitbucket pipeline - SonarCloud Integration - Migrate Projects in Sonarcloud

Hi All – I’m new here with all the stuff around. I’m trying to Migrate SonarCloud current/existing pipeline with Bitbucket. The up running Sonarcloud’s project is residing at our Previous development agency and we are not using them anymore, also i have read only view on the agency’s workspace so I cannot delete or modify anything over there. I have subscribed for SonarCloud paid plan, imported our company Bitbucket workspace into Sonarcloud, and the remaining thing now is to complete the pipline setups as when i run commits in Bitbucket I keep getting errors because of Sonarcloud token.

On Bitbucket:

Status: Downloaded newer image for sonarsource/sonarcloud-scan:1.4.0
/usr/bin/run-scanner.sh: line 9: SONAR_TOKEN: SONAR_TOKEN variable missing.

Have you configured SONAR_TOKEN in your Bitbucket pipeline? This is explained in the tutorial for setting up a pipeline on Bitbucket Pipelines.

1 Like

Thanks Colin – I have now configured the variables. However, there is an existing project-A that was originally created by the previous web development agency and is currently linked to my Bitbucket repository. When I check the Docker logs on Bitbucket, it becomes apparent that the project-A key and organization belong to the web development agency’s workspace.

So, I get this error now: Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator.

How can i fix that ?. Thx.