问题描述
我使用 Sonar Cloud 通过 Gitlab CI 分析我的代码。通常在 SONAR_HOST_URL 中我放了 https://sonarcloud.io ,但是在管道完成声纳后,将我的分析放入 INFO: ANALYSIS SUCCESSFUL,您可以浏览 http://localhost:9000/dashboard。为什么我不在任何地方写这个网址。我希望在云版本中进行分析。
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 .\nuget.config
- MsBuild.exe ./Project/t:Rebuild
- SonarScanner.MSBuild.exe end /d:sonar.login="kjhnhgffddsdt"
only:
- merge_requests
- master
- develop
- GitLabQualityTool
这是错误信息:INFO: ANALYSIS SUCCESSFUL,您可以浏览 http://localhost:9000/dashboard?id。 在我的 gitlab 变量中 SONAR_HOST_URL=https://sonarcloud.io
这是我尝试的另一个版本:
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
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)