I use Sonar Cloud to analyze my code with Gitlab CI. How it is usually in the SONAR_HOST_URL I put https://sonarcloud.io , but after the pipeline finish sonar put my analysis into INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard.Why I don't write anywhere this URL. I want the analysis to be in the cloud version.
sonarcloud-check:
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
dependencies:
- build
script:
- choco install sonarqube-scanner.portable
- SonarScanner.MSBuild.exe begin /k:"somefile" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="kjhnhgffddsdt"
- nuget restore -ConfigFile .
uget.config
- MsBuild.exe ./Project/t:Rebuild
- SonarScanner.MSBuild.exe end /d:sonar.login="kjhnhgffddsdt"
only:
- merge_requests
- master
- develop
- GitLabQualityTool
This is the error: INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id.
In my gitlab variables SONAR_HOST_URL=https://sonarcloud.io
This is another version that I try:
analyze:
stage: analyze
image:
name: sonarsource/sonar-scanner-cli:latest
entrypoint: [""]
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner
only:
- master
- IDEA-022
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…