'Gitlab pipeline - reports config contains unknown keys: cobertura

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


Solution 1:[1]

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

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Clau St
Solution 2