Closed offa closed 3 months ago
Maybe you'd have better luck on the Jira tracker. I'm not sure which tracker gets more attention.
It might also be useful to try to get some attention from the coverage
plugin side. While it has a GitHub repo, its maintainers are clear that Jira is its only issue tracker (versus cobertura
, which lists both Jira and GitHub trackers).
I have a PR for this (#224). While I think I made some progress, I did hit a roadblock with a dependency version conflict.
Someone created a ticket: https://issues.jenkins.io/browse/JENKINS-73238 (thank you !). Their answer was: functionality from cobertura plugin should be included in "coverage" ... so we can just remove it
Thanks, @jgournet . Let us know what happens if and when you try it out.
Indeed, Coverage is a better choice. Let's close here then.
Their answer was: functionality from cobertura plugin should be included in "coverage" ... so we can just remove it
Apologies for my ignorance here but how do we remove it when the Cobertura plug-in depends on it?
There's a new Coverage plugin, not to confuse with the Code Coverage Plugin.
There's a new Coverage plugin, not to confuse with the Code Coverage Plugin.
Yep, I understand that and I have that installed in my Jenkins installation:
Unfortunately I cannot uninstall or disable Code Coverage v4.99 as Cobertura v1.17 has a dependency on it - unless there is another way of performing that. If so could you please enlighten me?
With the new Coverage plugin you should be able to replace the Cobertura and (old) Coverage plugin.
With the new Coverage plugin you should be able to replace the Cobertura and (old) Coverage plugin.
Thanks - Like others I thought the new Coverage plug-in was a replacement for the old Code Coverage plug-in rather than a replacement for both.
I have now updated my Jenkinsfile to use recordCoverage
instead and uninstalled both the Cobertura plug-in and the old Code Coverage plug-in.
I have now updated my Jenkinsfile to use
recordCoverage
instead and uninstalled both the Cobertura plug-in and the old Code Coverage plug-in.
Thank you; I have done the same.
Just in case anyone is unclear on what changes are required to make Coverage
work properly, I will share what I did here. I used the pipeline snippet generator for recordCoverage
(go to 'Pipeline Syntax > Snippet Generator') to generate the necessary code. After modifying my Jenkinsfile accordingly, everything is working properly. Here's the diff for my Jenkinsfile:
- cobertura(coberturaReportFile: 'coverage/coverage.xml', onlyStable: false)
+ recordCoverage(tools: [[parser: 'COBERTURA', pattern: 'coverage/coverage.xml']])
The onlyStable: false
k-v pair is unnecessary for Coverage; it is automatically recording coverage for both stable and unstable builds.
Jenkins and plugins versions report
any
What Operating System are you using (both controller, and any agents involved in the problem)?
any
Reproduction steps
a. See Jenkins UI warning b. See code-coverage-api project (eg. https://github.com/jenkinsci/code-coverage-api-plugin)
Expected Results
Migration to Coverage Plugin (as suggested in the docs)
Actual Results
Deprecated / EOL dependency is used
Anything else?
The new Coverage plugin seems not to be a drop in replacement and code changes are likely needed.
Are you interested in contributing a fix?
No response