Gitlab pipeline - reports config contains unknown keys: cobertura

28.2k Views Asked by At

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
2

There are 2 best solutions below

1
Clau St On BEST ANSWER

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
2
Peter On

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