Gitlab 代码质量 : where is the report?

标签 gitlab gitlab-ci

关于这个项目:https://gitlab.com/tyvain/parcoursup/tree/master

我有一个代码质量阶段:

code_quality:
  stage: code_quality
  image: docker:stable
  variables:
    DOCKER_DRIVER: overlay2
  allow_failure: true
  services:
    - docker:stable-dind
  script:
    - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
    - docker run
        --env SOURCE_CODE="$PWD"
        --volume "$PWD":/code
        --volume /var/run/docker.sock:/var/run/docker.sock
        "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
  artifacts:
    paths: [gl-code-quality-report.json]

这个阶段总是以“通过”告终。日志:https://gitlab.com/tyvain/parcoursup/-/jobs/94665791

我怀疑我的代码是否完美,所以应该在某处存在一些代码质量问题。

代码质量报告应该在哪里输出?
这个参数是什么:“路径:[gl-code-quality-report.json]”?

最佳答案

这里有2个问题:

  • 该报告仅适用于“gitlab EE 版”(非免费)中的合并请求
  • 该报告可以在此处下载为 json 文件:where to download artifacts
  • 关于Gitlab 代码质量 : where is the report?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52174028/

    相关文章:

    python - 使用 Shell Executor 在 GitLab Config yml 文件中为 CI-CD 激活 Conda 环境

    git - 让 git 用户的 sshd 登录转发到(GitLab)Docker 容器

    git - 为什么 GitLab Graph 只显示提交而不显示添加/删除?

    gitlab - 故事书 Gitlab 页面 : script importing from wrong URL resulting in CORS errors

    docker - 无法从远程 Gitlab 注册表拉取镜像到 Kubernetes

    gitlab - gitlab ci 管道文件中的引用策略是什么?

    ansible - 无法从数据库中获取 gitlab runners 注册 token

    git - 将存储库从 Gitlab 迁移到 Azure DevOps

    go - 如何从 ci/cd gitlab 管道中的 proto 文件生成 pb 文件?

    bash - Gitlab-CI 测试文件名的日期变量