Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30700

Make Cobertura plug-in support the workflow plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      I am using the Cobertura plugin in my project for several jobs and now want to specify my jobs as Workflow jobs to better manage my application and reduce configuration overhead.

      Thanks,
      Yotam

        Attachments

          Issue Links

            Activity

            Hide
            rocktavious kyle rockman added a comment -

            +100 on this, we just switched to jenkins pipeline (formerly workflow) and this plugin is not supported. I would hate to have to roll my own solution just to get my coverage reports publisher need back.

            Show
            rocktavious kyle rockman added a comment - +100 on this, we just switched to jenkins pipeline (formerly workflow) and this plugin is not supported. I would hate to have to roll my own solution just to get my coverage reports publisher need back.
            Hide
            mcobden Marcus Cobden added a comment -

            I'm working a changeset for this, but I could do with some advice from someone more familiar with how Jenkins plugins work, as I'm mostly guessing and copying from the junit and xunit plugins.

            Show
            mcobden Marcus Cobden added a comment - I'm working a changeset for this, but I could do with some advice from someone more familiar with how Jenkins plugins work, as I'm mostly guessing and copying from the junit and xunit plugins.
            Hide
            mcobden Marcus Cobden added a comment -
            Show
            mcobden Marcus Cobden added a comment - This commit highlights the areas I need some advice on: https://github.com/leth/cobertura-plugin/commit/52a2ce9b2ec9dde01ff9054e1184c2e833e00a60
            Hide
            s0undt3ch Pedro Algarvio added a comment -

            I've been waiting for this support for a while now, unfortunately I do not know enough Java to do it myself or I would.

            Are there any plans to implement this? Besides eventually of course.

            Show
            s0undt3ch Pedro Algarvio added a comment - I've been waiting for this support for a while now, unfortunately I do not know enough Java to do it myself or I would. Are there any plans to implement this? Besides eventually of course.
            Hide
            bhipple Benjamin Hipple added a comment -

            Support for this plugin in pipeline would be wonderful. I have a large number of Jenkins Enterprise jobs that I'd like to port over to Pipeline, but it's a hard sell to developers and managers who enjoy having the nice test coverage graphs. Any updates?

            Show
            bhipple Benjamin Hipple added a comment - Support for this plugin in pipeline would be wonderful. I have a large number of Jenkins Enterprise jobs that I'd like to port over to Pipeline, but it's a hard sell to developers and managers who enjoy having the nice test coverage graphs. Any updates?
            Hide
            djviking Sverre Moe added a comment - - edited

            Old issue. Hope to see a fix soon. Now with Jenkins 2.0, pipelines will become more prevalent.

            Show
            djviking Sverre Moe added a comment - - edited Old issue. Hope to see a fix soon. Now with Jenkins 2.0, pipelines will become more prevalent.
            Hide
            mbarrien Michael Barrientos added a comment -

            There is a week old pull request that needs feedback that implements this at https://github.com/jenkinsci/cobertura-plugin/pull/55

            Show
            mbarrien Michael Barrientos added a comment - There is a week old pull request that needs feedback that implements this at https://github.com/jenkinsci/cobertura-plugin/pull/55
            Hide
            djviking Sverre Moe added a comment - - edited

            The GitHub Cobertura issues#50 at https://github.com/jenkinsci/cobertura-plugin/issues/50 shows an update 6 hours ago by Michael Barrientos referencing this issue

            Show
            djviking Sverre Moe added a comment - - edited The GitHub Cobertura issues#50 at https://github.com/jenkinsci/cobertura-plugin/issues/50 shows an update 6 hours ago by Michael Barrientos referencing this issue
            Hide
            abcfy2 feng yu added a comment -

            So old issue. Is there any progress about this issue? Wish this issue will be resolved soon.

            Show
            abcfy2 feng yu added a comment - So old issue. Is there any progress about this issue? Wish this issue will be resolved soon.
            Hide
            clausfod clausfod added a comment -

            What is the status for making the Cobertura plugin Pipeline ready ?

            Show
            clausfod clausfod added a comment - What is the status for making the Cobertura plugin Pipeline ready ?
            Hide
            codersparks coder sparks added a comment -

            Michael Barrientos Is there any news on progress on this - It is the only plugin that I am waiting for so that I can use Multibranch Pipeline job that will replace my freestyle job?

            If not does anyone else know how to update - I have had a look but having never touched the internals of a jenkins plugin my head is now hurting

            Show
            codersparks coder sparks added a comment - Michael Barrientos Is there any news on progress on this - It is the only plugin that I am waiting for so that I can use Multibranch Pipeline job that will replace my freestyle job? If not does anyone else know how to update - I have had a look but having never touched the internals of a jenkins plugin my head is now hurting
            Hide
            consolati1 John Consolati added a comment -

            I am also interested in the status of this plugin becoming Pipeline ready!

            Show
            consolati1 John Consolati added a comment - I am also interested in the status of this plugin becoming Pipeline ready!
            Hide
            syb3181 Yibin Sheng added a comment - - edited

            I use HTML Publisher to publish coverage report now, but it is far from satisfactory.

            Show
            syb3181 Yibin Sheng added a comment - - edited I use HTML Publisher to publish coverage report now, but it is far from satisfactory.
            Hide
            orenchapo Oren Chapo added a comment -

            I'm also waiting for Pipeline support, all my Jenkins jobs are pipelines.
            PR-55 looks promising, hope it will be released soon!

            Show
            orenchapo Oren Chapo added a comment - I'm also waiting for Pipeline support, all my Jenkins jobs are pipelines. PR-55 looks promising, hope it will be released soon!
            Hide
            kampak1111 Kamil P added a comment -

            Hi, Just to say it would be useful for me too.

            Show
            kampak1111 Kamil P added a comment - Hi, Just to say it would be useful for me too.
            Hide
            jenkinator Aravind Krishna added a comment -


            We are also waiting for this, and currently this is the only blocker for us to move to Pipeline based jobs.

            Show
            jenkinator Aravind Krishna added a comment - We are also waiting for this, and currently this is the only blocker for us to move to Pipeline based jobs.
            Hide
            jenkinator Aravind Krishna added a comment -

            Yibin Sheng how do you use HTML publisher to publish cobertura reports (when there are multiple), do you have any example?

            Show
            jenkinator Aravind Krishna added a comment - Yibin Sheng how do you use HTML publisher to publish cobertura reports (when there are multiple), do you have any example?
            Hide
            kampak1111 Kamil P added a comment -

            this is how I use the html publisher in jenkinsfile

                    publishHTML(target: [
                            reportName           : 'Coverage Report 1',
                            reportDir            : 'foldername/target/coverage-reports/',
                            reportFiles          : 'index.html',
                            keepAll              : true,
                            alwaysLinkToLastBuild: true,
                            allowMissing         : false
                    ])
            
            Show
            kampak1111 Kamil P added a comment - this is how I use the html publisher in jenkinsfile publishHTML(target: [ reportName : 'Coverage Report 1' , reportDir : 'foldername/target/coverage-reports/' , reportFiles : 'index.html' , keepAll : true , alwaysLinkToLastBuild: true , allowMissing : false ])
            Hide
            syb3181 Yibin Sheng added a comment -

            Aravind Krishna just as Kamil P posted. BTW, you may use the jenkins groovy syntax box to generate the DSL. To report multiple files in different module in one site, you may put the report dir empty and the reported files pointing to its file path. That's all I know about the plugin.

            Show
            syb3181 Yibin Sheng added a comment - Aravind Krishna just as Kamil P posted. BTW, you may use the jenkins groovy syntax box to generate the DSL. To report multiple files in different module in one site, you may put the report dir empty and the reported files pointing to its file path. That's all I know about the plugin.
            Hide
            jenkinator Aravind Krishna added a comment - - edited

            Thanks Yibin Sheng and Kamil P. I was able to publish the coverage reports.

            How do you generate the trend report of the coverage info?

            Show
            jenkinator Aravind Krishna added a comment - - edited Thanks Yibin Sheng and Kamil P . I was able to publish the coverage reports. How do you generate the trend report of the coverage info?
            Hide
            syb3181 Yibin Sheng added a comment -

            publishHTML([
            allowMissing: false,
            alwaysLinkToLastBuild: false,
            keepAll: true,
            reportDir: '',
            reportFiles:
            '''common/target/site/cobertura/frame-summary.html,
            config-pusher/target/site/cobertura/frame-summary.html,
            experimental/target/site/cobertura/frame-summary.html,
            joiner/target/site/cobertura/frame-summary.html,
            lookup-service/target/site/cobertura/frame-summary.html,
            stream-reader/target/site/cobertura/frame-summary.html''',
            reportName: 'Coverage Report'
            ])
            Aravind Krishna I wonder if the "keepAll" option meets your need.

            Show
            syb3181 Yibin Sheng added a comment - publishHTML([ allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: '', reportFiles: '''common/target/site/cobertura/frame-summary.html, config-pusher/target/site/cobertura/frame-summary.html, experimental/target/site/cobertura/frame-summary.html, joiner/target/site/cobertura/frame-summary.html, lookup-service/target/site/cobertura/frame-summary.html, stream-reader/target/site/cobertura/frame-summary.html''', reportName: 'Coverage Report' ]) Aravind Krishna I wonder if the "keepAll" option meets your need.
            Hide
            jenkinator Aravind Krishna added a comment -

            Yibin Sheng Thanks. However, "keepAll" just archives the reports of all previous builds, but doesn't help plot the trend report. I am wondering if there is any way to specify HTML report to plot the trend for a custom field (example: line coverage), basically what the Cobertura report publishing does.

            Show
            jenkinator Aravind Krishna added a comment - Yibin Sheng Thanks. However, "keepAll" just archives the reports of all previous builds, but doesn't help plot the trend report. I am wondering if there is any way to specify HTML report to plot the trend for a custom field (example: line coverage), basically what the Cobertura report publishing does.
            Hide
            pedrofurlanetto Pedro Furlanetto added a comment -

            Is there any update? It will be really useful to have this feature working.

            Show
            pedrofurlanetto Pedro Furlanetto added a comment - Is there any update? It will be really useful to have this feature working.
            Hide
            ryang Ryan Garchinsky added a comment -

            I agree this would be useful. We recently moved to pipelines and this is 1 thing we are missing.

            Show
            ryang Ryan Garchinsky added a comment - I agree this would be useful. We recently moved to pipelines and this is 1 thing we are missing.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michael Barrientos
            Path:
            pom.xml
            src/main/java/hudson/plugins/cobertura/BuildUtils.java
            src/main/java/hudson/plugins/cobertura/Chartable.java
            src/main/java/hudson/plugins/cobertura/CoberturaBuildAction.java
            src/main/java/hudson/plugins/cobertura/CoberturaProjectAction.java
            src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java
            src/main/java/hudson/plugins/cobertura/CoverageChart.java
            src/main/java/hudson/plugins/cobertura/MavenCoberturaBuildAction.java
            src/main/java/hudson/plugins/cobertura/MavenCoberturaPublisher.java
            src/main/java/hudson/plugins/cobertura/renderers/SourceCodePainter.java
            src/main/java/hudson/plugins/cobertura/targets/CoverageResult.java
            src/test/java/CoverageTablePortlet/CoverageTablePortletTest.java
            src/test/java/hudson/plugins/cobertura/CoberturaFunctionalTest.java
            src/test/java/hudson/plugins/cobertura/CoverageResultBuilder.java
            src/test/java/hudson/plugins/cobertura/CoverageResultTest.java
            http://jenkins-ci.org/commit/cobertura-plugin/85fd6380809a45dff5319d8eb385920d2163fe10
            Log:
            JENKINS-30700 / #50 Jenkins pipeline support

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Barrientos Path: pom.xml src/main/java/hudson/plugins/cobertura/BuildUtils.java src/main/java/hudson/plugins/cobertura/Chartable.java src/main/java/hudson/plugins/cobertura/CoberturaBuildAction.java src/main/java/hudson/plugins/cobertura/CoberturaProjectAction.java src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java src/main/java/hudson/plugins/cobertura/CoverageChart.java src/main/java/hudson/plugins/cobertura/MavenCoberturaBuildAction.java src/main/java/hudson/plugins/cobertura/MavenCoberturaPublisher.java src/main/java/hudson/plugins/cobertura/renderers/SourceCodePainter.java src/main/java/hudson/plugins/cobertura/targets/CoverageResult.java src/test/java/CoverageTablePortlet/CoverageTablePortletTest.java src/test/java/hudson/plugins/cobertura/CoberturaFunctionalTest.java src/test/java/hudson/plugins/cobertura/CoverageResultBuilder.java src/test/java/hudson/plugins/cobertura/CoverageResultTest.java http://jenkins-ci.org/commit/cobertura-plugin/85fd6380809a45dff5319d8eb385920d2163fe10 Log: JENKINS-30700 / #50 Jenkins pipeline support
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Michael Barrientos
            Path:
            src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java
            src/main/java/hudson/plugins/cobertura/targets/CoverageTarget.java
            http://jenkins-ci.org/commit/cobertura-plugin/681d24c4def7b8b74f0186bc15f205c634524f62
            Log:
            Merge pull request #55 from mbarrien/pipeline

            JENKINS-30700 / #50 Jenkins pipeline support

            Compare: https://github.com/jenkinsci/cobertura-plugin/compare/75d7da7accfc...681d24c4def7

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Barrientos Path: src/main/java/hudson/plugins/cobertura/CoberturaPublisher.java src/main/java/hudson/plugins/cobertura/targets/CoverageTarget.java http://jenkins-ci.org/commit/cobertura-plugin/681d24c4def7b8b74f0186bc15f205c634524f62 Log: Merge pull request #55 from mbarrien/pipeline JENKINS-30700 / #50 Jenkins pipeline support Compare: https://github.com/jenkinsci/cobertura-plugin/compare/75d7da7accfc...681d24c4def7
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            COMPATIBILITY.md
            http://jenkins-ci.org/commit/pipeline-plugin/23d473486c8e345e8f6586d30f889c313f9f5adf
            Log:
            Merge pull request #438 from jenkinsci/recampbell-patch-1

            JENKINS-30700 Noting cobertura fix

            Compare: https://github.com/jenkinsci/pipeline-plugin/compare/d537ba19e3cf...23d473486c8e

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: COMPATIBILITY.md http://jenkins-ci.org/commit/pipeline-plugin/23d473486c8e345e8f6586d30f889c313f9f5adf Log: Merge pull request #438 from jenkinsci/recampbell-patch-1 JENKINS-30700 Noting cobertura fix Compare: https://github.com/jenkinsci/pipeline-plugin/compare/d537ba19e3cf...23d473486c8e
            Hide
            jeffpearce Jeff Pearce added a comment -

            This was fixed in release 1.10

            Show
            jeffpearce Jeff Pearce added a comment - This was fixed in release 1.10
            Hide
            nitek Claus Näveke added a comment -

            Is there any kind of documentation available for the pipeline syntax? I couldn't find any, neither on the wiki nor on github

            Show
            nitek Claus Näveke added a comment - Is there any kind of documentation available for the pipeline syntax? I couldn't find any, neither on the wiki nor on github
            Hide
            jeffpearce Jeff Pearce added a comment - - edited

            It would probably be good to have something on the wiki, but you can use the snippet generator to see the syntax. It's under Step: General Build Step. The only caveat is that it doesn't currently generate the code for coverage targets. The next release will generate coverage targets correctly, and it will show as a separate step in the snippet generator instead of under General Build Step

            Show
            jeffpearce Jeff Pearce added a comment - - edited It would probably be good to have something on the wiki, but you can use the snippet generator to see the syntax. It's under Step: General Build Step. The only caveat is that it doesn't currently generate the code for coverage targets. The next release will generate coverage targets correctly, and it will show as a separate step in the snippet generator instead of under General Build Step
            Hide
            francisdb francisdb added a comment - - edited

            Generates something like this:

             

            step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'fdsfsdfds', failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false])

             

            would be nice if we could just do like the junit reports

            post {
              always {
                junit '*/target/test-reports/.xml'
                }
            }

            Show
            francisdb francisdb added a comment - - edited Generates something like this:   step( [$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'fdsfsdfds', failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false] )   would be nice if we could just do like the junit reports post {   always {     junit '* /target/test-reports/ .xml'     } }
            Hide
            jeffpearce Jeff Pearce added a comment -

            The next version will support that

            Show
            jeffpearce Jeff Pearce added a comment - The next version will support that
            Hide
            chantivlad chanti vlad added a comment -

            Jeff Pearce: when is the next version planned for ?

            Show
            chantivlad chanti vlad added a comment - Jeff Pearce : when is the next version planned for ?
            Hide
            xirustam Rustem Zinnatullin added a comment -

            Hi, any news on this?

            Show
            xirustam Rustem Zinnatullin added a comment - Hi, any news on this?
            Hide
            jeffpearce Jeff Pearce added a comment - - edited

            Maybe I'm misunderstanding something, but with recent versions of the plugin, you can do this in your Jenkinsfile:

            post {

              always {
                cobertura coberturaReportFile: '*/.xml'
                }
            }

             

            Does that meet your needs?

            Show
            jeffpearce Jeff Pearce added a comment - - edited Maybe I'm misunderstanding something, but with recent versions of the plugin, you can do this in your Jenkinsfile: post {   always {     cobertura coberturaReportFile: '* / .xml'     } }   Does that meet your needs?
            Hide
            xirustam Rustem Zinnatullin added a comment -

            Jeff Pearce,
            yes, this is what I needed, thanks!

            Show
            xirustam Rustem Zinnatullin added a comment - Jeff Pearce , yes, this is what I needed, thanks!
            Hide
            chantivlad chanti vlad added a comment -

            Works like a charm Jeff Pearce, thanks

            Show
            chantivlad chanti vlad added a comment - Works like a charm Jeff Pearce , thanks
            Hide
            jeffpearce Jeff Pearce added a comment -

            Glad to hear. Thanks Michael Barrientos - he did the work

            Show
            jeffpearce Jeff Pearce added a comment - Glad to hear. Thanks Michael Barrientos - he did the work

              People

              • Assignee:
                mbarrien Michael Barrientos
                Reporter:
                yotamshapira Yotam Shapira
              • Votes:
                82 Vote for this issue
                Watchers:
                86 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: