I found this: https://blog.sonarsource.com/sonarcloud-bitbucket-pipe
Unfortunately, it looks a little incomplete.
When I run it against my java project, it seems to not figure out the project key.
I presume that it’s not actually using the sensible variable choices that come from bitbucket as variables.
I notice that the docker hub file for this new sonar scanner is completely devoid of info.
As is…basically all of sonar cloud’s site. How is this actually supposed to work? Previously, I’ve done this in a step, and just used it in a maven container. Using a pipeline would definitely be nicer, especially if it kept track of all these details for me rather than forcing me to figure them out.
mvn sonar:sonar -Dsonar.login=$SONAR_CLOUD_TOKEN -Dsonar.projectKey=$BITBUCKET_REPO_SLUG -Dsonar.branch.name=$BITBUCKET_BRANCH -Dsonar.projectName=$BITBUCKET_REPO_SLUG -Dsonar.projectVersion=1.0 -Dsonar.host.url=https://sonarcloud.io