Gitlab 管道 - 报告配置包含未知键:cobertura

Sha*_* KL 42 pipeline cobertura gitlab gitlab-ci

由于此错误,我无法运行 gitlab 管道

Invalid CI config YAML file
jobs:run tests:artifacts:reports config contains unknown keys: cobertura
Run Code Online (Sandbox Code Playgroud)

Cla*_* St 82

Check the latest correct doc here: https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportscoverage_report

Some of the docs are in somewhat of a messy state right now, due to the new release as mentioned.

This was the fix for me:

  artifacts:
    expire_in: 2 days
    reports:
      coverage_report:
        coverage_format: cobertura
        path: python_app/coverage.xml
Run Code Online (Sandbox Code Playgroud)

  • 了解更多背景信息。如此处所述 https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportscobertura-removed cobertura 的旧配置格式在 GitLab 14.7 中已弃用,并在 GitLab 15.0 中删除。 (4认同)

Pet*_*ter 7

GitLab 已删除 Cobetura 报告。

来自他们的15.0 发行说明

作为我们长期战略的一部分,我们正在减少 GitLab SAST 中使用的分析器数量,以提供更好、更一致的用户体验。简化分析器集还可以实现更快的迭代、更好的结果和更高的效率(包括在大多数情况下减少 CI 运行器的使用)。

你可以在这里看到提交