Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.9k views
in Technique[技术] by (71.8m points)

gitlab - Can't get analises report on Sonar Cloud

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...