We are planning to integrate “bitbucket” with “sonarcloud” using bitbucket pipelines. Here are the things done for the integration, but looks like some config is missing and the integration is breaking.
- Create an account in sonarcloud.io, with bitbucket login.
- Go through the process of creation of new project in sonarcloud.io and obtain a token to be used.
- Configure the token in the bitbucket pipelines as env variable, SONAR_TOKEN.
Now this is how the build is run from bitbucket pipeline.
bash ./gradlew sonarqube -Dsonar.organization=cleartrip -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
When the build runs its giving me the below error, not
Could not fetch Bitbucket branch info: Insufficient privileges
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonarqube'.
> You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator.
Is there any other authorization configuration required?