首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Gitlab CI/CD上找到声纳扫描仪命令

在Gitlab CI/CD上找到声纳扫描仪命令
EN

Stack Overflow用户
提问于 2022-08-10 10:59:21
回答 1查看 454关注 0票数 0

我正在尝试将Sonarqube集成到我在Gitlab上的CI/CD项目中。据我所知,我一直在跟踪关于Gitlab和Sonarqube的文档,以便将这份工作包含在我的yml文件中。

我正在经历错误,如下图所示

这是我的yml文件脚本

代码语言:javascript
复制
build_project:
  stage: build
  script:
    - xcodebuild clean -workspace TinggIOS/TinggIOS.xcworkspace -scheme TinggIOS | xcpretty
    - xcodebuild test -workspace TinggIOS/TinggIOS.xcworkspace -scheme TinggIOS -destination 'platform=iOS Simulator,name=iPhone 11 Pro Max,OS=15' | xcpretty -s
  tags:
    - stage
  image: macos-11-xcode-12

sonarqube-check:
  stage: analyze
  image:
    name: sonarsource/sonar-scanner-cli:latest
    entrypoint: [""]
  variables:
    SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"  # Defines the location of the analysis task cache
    GIT_DEPTH: "0"  # Tells git to fetch all the branches of the project, required by the analysis task
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - .sonar/cache
  script:
    - sonar-scanner -Dsonar.qualitygate.wait=true
  allow_failure: true
  only:
    - merge_requests
    - feature/unit-test # or the name of your main branch
    - develop
  tags:
    - stage
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-08-10 15:57:07

看上去像是

代码语言:javascript
复制
- sonar-scanner -Dsonar.qualitygate.wait=true

找不到命令。尝试在正在设置管道的机器上运行该命令(就像ssh进入该机器或ssh进入该机器并尝试运行该命令)。问题可能是它没有安装在那里。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73305098

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档