Gitlab pipeline - reports config contains unknown keys: cobertura
Asked Answered
J

2

43

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
Jared answered 6/5, 2022 at 8:1 Comment(0)
B
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
Brainwashing answered 6/5, 2022 at 8:20 Comment(1)
For more context. As documented here docs.gitlab.com/ee/ci/yaml/… the old configuration format for cobertura was deprecated in GitLab 14.7 and removed in GitLab 15.0.Chaunce
P
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

Palmitin answered 6/5, 2022 at 8:16 Comment(2)
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 formatTepefy
@MoacirRosa thanks for the info. I also see a new answer with an updated config. I'll try it out.Palmitin

© 2022 - 2024 — McMap. All rights reserved.