Closed GabLeRoux closed 7 years ago
+1
👍
Till we have a support from the Jenkins side, it can't be fixed
by django-jenkins
The commits done here: https://github.com/jenkinsci/cobertura-plugin/pull/55#issuecomment-274665570
Should fix the covertura problem I had in jenkinsci/cobertura-plugin#61 when using jenkinsfile
, and I still think it'd be great to improve documentation as I managed to get this working, but it's not docuemnted anywhere. ;)
Just a small change when building the Cobertura modified plugin, don't forget to checkout the pipeline branch:
git clone https://github.com/mbarrien/cobertura-plugin/
cd cobertura-plugin
git checkout pipeline
mvn install
:)
So good
i am using Jacoco plugin for code coverage its showing 0.0% coverage in Sonar UI, I am using Jenkins pipeline jobs by using Groovy script
I tried to integrate this into my pipeline job on jenkins. See #351 for most recent documentation :books:. ;)
I'd like to add description on how to use this plugin with the new jenkins pipeline syntax.
There is this pull request on cubertura to add support for
coverage.xml
from pipeline. https://github.com/jenkinsci/cobertura-plugin/pull/55I also commented on https://github.com/jenkinsci/cobertura-plugin/issues/50#issuecomment-262419362 where I described how to use https://github.com/cwacek/cobertura-clover-transform and use clover instead of cobertura as a temp workaround, but it failed on my side.
Here's how I managed to get
coverage.xml
andjunit.xml
to work in jenkins: I cloned https://github.com/mbarrien/cobertura-plugin/tree/pipeline (pipeline branch, that's the pr 55 above), compiled the plugin:This generated the
.hpi
plugin which I installed fromJenkins -> Manage Jenkins -> Configure Plugins -> Advanced
and installed Cobertura plugin from there.My app name is in
PROJECT_APPS
tuple as requested by django-jenkins. Here's what myJenkinsfile
looks like:Everything seems to work fine:
But there's one thing left I'm still fighting with, I created an issue on Cobertura's side: https://github.com/jenkinsci/cobertura-plugin/issues/61 I'd be very happy if someone has an idea on this!