Pipeline Build Repo
Pipeline Build SonarScan
Pipeline Deploy Repo
Pipeline Deploy SonarGate
But without the host.url said the same message “ERROR: SONARQUBE SERVER [HTTP://LOCALHOST:9000] CAN NOT BE REACHED”
What am I doing wrong?
Typically, in Bitbucket Pipelines, the default host should be https://sonarcloud.io unless overriden somewhere. This relies on the presence of the BITBUCKET_BUILD_NUMBER environment variable. Is that environment variable available during your build?
In any case, even if you still need to manually set sonar.host.url, it’s not the end of the world. I would encourage leaving out -Dsonar.login and relying on having SONAR_TOKEN configured)
You may want to try using the latest version of the pipe, 1.4.0.
Can you confirm how/where you’re setting SONAR_TOKEN? A screenshot would be helpful.
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
memory: 1024 #increasing docker service memory
- step: &build-test-sonarcloud
name: Build, test and analyze on SonarCloud
- pipe: sonarsource/sonarcloud-scan:1.4.0
- step: &check-quality-gate-sonarcloud
name: Check the Quality Gate on SonarCloud
- pipe: sonarsource/sonarcloud-quality-gate:0.1.4