42

I'm not able run the gitlab pipeline due to this error

Invalid CI config YAML file
jobs:run tests:artifacts:reports config contains unknown keys: cobertura
Shashikumar KL
  • 1,007
  • 1
  • 10
  • 25

2 Answers2

77

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
Clau St
  • 970
  • 9
  • 14
  • 3
    For more context. As documented here https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportscobertura-removed the old configuration format for cobertura was deprecated in GitLab 14.7 and removed in GitLab 15.0. – Haprog Jul 13 '22 at 06:38
7

GitLab has removed Cobetura reports.

From their 15.0 release notes

We are reducing the number of analyzers used in GitLab SAST as part of our long-term strategy to deliver a better and more consistent user experience. Streamlining the set of analyzers will also enable faster iteration, better results, and greater efficiency (including a reduction in CI runner usage in most cases).

And you can see the commit here

Peter
  • 4,493
  • 6
  • 41
  • 64
  • 1
    I'm not sure it was removed. In the commit you mentioned, it's being removed. However in the [same file we have _cobertura_ as a valid format](https://gitlab.com/gitlab-org/gitlab/-/blob/812408bafae328b81652110fc53c6c6b89e3db81/app/assets/javascripts/editor/schema/ci.json#L179) – Moacir Rosa May 06 '22 at 16:28
  • @MoacirRosa thanks for the info. I also see a new answer with an updated config. I'll try it out. – Peter May 11 '22 at 09:21