I am very new to sonarcloud. I am trying to implement sonarcloud into the bitbucket pipeline.
I follow the tutorial for sonarcloud to analyze the new project then I get following code to run.
sonar-scanner.bat -D"sonar.projectKey=mywebsite" -D"sonar.organization=xxxxxxxx-bitbucket" -D"sonar.sources=." -D"sonar.host.url=https://sonarcloud.io" -D"sonar.login=xxxxxxxxxxxxxxxxx"
When I run this, it shows me error in my code and with some message at the end.
INFO: ANALYSIS SUCCESSFUL, you can browse https://sonarcloud.io/dashboard?id=mywebsite
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://sonarcloud.io/api/ce/task?id=XXXXXXXXXXXXXXXXX
But when I check into the given link it shows empty.
I have following lines in my bitbucket-pipeline.yml file
image: atlassian/default-image:2
definitions:
caches:
sonar: ~/.sonar/cache
steps:
- step: &sonarcloud
name: Analyze on SonarCloud
caches:
- sonar
- composer
script:
- apt-get update
- composer update --no-interaction --no-suggest --no-progress
- vendor/bin/phpunit --coverage-clover=coverage-report.clover --log-junit=test-report.xml
- sonar-scanner
- pipe: sonarsource/sonarcloud-scan:0.1.5
variables:
SONAR_TOKEN: ${SONAR_TOKEN}
pipelines:
Can any body please help me how can I integrate this sonar to bitbucket?
Thank You.