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

Jacoco creates multiple Coverage reports and Trends graphs

      After yesterday's upgrade of Jenkins from 2.140 to 2.146 and several plugins, to many to enumerate, our pipeline jobs now generates loads of jacoco Coverage reports and Trends graphs. The jobs can hardly be opened probably due to the amount of data to load and they take forever to build. What has happened? I'am building at the moment so I'll add relevant data from the log files if I find any suspicous printouts.   

      Very similar to this issue:

      http://jenkins-ci.361315.n4.nabble.com/jacoco-plugin-broken-after-update-of-Pipeline-Maven-Integration-plugin-td4948864.html 

          [JENKINS-54038] Jacoco creates multiple Coverage reports and Trends graphs

          Kent Granström created issue -
          Kent Granström made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Kent Granström made changes -
          Summary Original: Jacoco creates multiple Coverage reports and trends grapphs New: Jacoco creates multiple Coverage reports and Trends graphs
          Kent Granström made changes -
          Description Original: After yesterday's upgrade of Jenkins from 2.140 to 2.146 and several plugins, to many to enumerate, our pipeline jobs now generates loads of jacoco Coverage reports and Trends graphs. The jobs can hardly be opened probably due to the amount of data to load and they take forever to build. What has happened? I'am building at the moment so I'll add relevant data from the log files if I find any suspicous printouts.    New: After yesterday's upgrade of Jenkins from 2.140 to 2.146 and several plugins, to many to enumerate, our pipeline jobs now generates loads of jacoco Coverage reports and Trends graphs. The jobs can hardly be opened probably due to the amount of data to load and they take forever to build. What has happened? I'am building at the moment so I'll add relevant data from the log files if I find any suspicous printouts.   

          Very similar to this issue:

          [http://jenkins-ci.361315.n4.nabble.com/jacoco-plugin-broken-after-update-of-Pipeline-Maven-Integration-plugin-td4948864.html

          We faced the same problem after update from jacoco plugin 3.0.1 to 3.0.3, jenkins core 2.121.1

          Alexander Moiseenko added a comment - We faced the same problem after update from jacoco plugin 3.0.1 to 3.0.3, jenkins core 2.121.1
          Kent Granström made changes -
          Comment [ Can someone who has the knowledge address this issue plz?  ]

          Falko Modler added a comment - - edited

          As per pipeline-maven 3.5.15+, multi module coverage reports are disabled:

          So instead of too many reports you get, well, none!

          I am not sure how to solve this. I suppose you must now either merge the exec files and feed this into jacoco-plugin explicitly or you have to generate your own report (via the maven plugin) which you then might be able to publish with HTML Publisher Plugin.
          Or "just" use SonarQube...

          Falko Modler added a comment - - edited As per pipeline-maven 3.5.15+, multi module coverage reports are disabled : https://issues.jenkins-ci.org/browse/JENKINS-54139?focusedCommentId=351853&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-351853 https://github.com/jenkinsci/pipeline-maven-plugin/commit/75ce8e28539151ac35615655deb15d860a963c83#diff-00c89ee459a797b514c25cf81fa61585R131 So instead of too many reports you get, well, none! I am not sure how to solve this. I suppose you must now either merge the exec files and feed this into jacoco-plugin explicitly or you have to generate your own report ( via the maven plugin ) which you then might be able to publish with HTML Publisher Plugin . Or "just" use SonarQube...

          Falko Modler added a comment - - edited

          Update to my previous comment:

          The workaround for recent pipeline-maven versions is actually easier than I first thought:
          Don't rely on withMaven() to create your aggregated report, just add an explicit jacoco() invocation instead!
          This will automatically "merge" all the exec files to create one big report for everything.

          If you want to explicitly disable the jacoco report publishing via withMaven() (which doesn't work anyway for multiple modules) you have two options:

          • withMaven(publisherStrategy: 'EXPLICIT', options: [...]) (don't add jacocoPublisher() to options)
          • withMaven(options: [jacocoPublisher(disabled: true)],...)

          Falko Modler added a comment - - edited Update to my previous comment: The workaround for recent pipeline-maven versions is actually easier than I first thought: Don't rely on withMaven() to create your aggregated report, just add an explicit jacoco() invocation instead! This will automatically "merge" all the exec files to create one big report for everything. If you want to explicitly disable the jacoco report publishing via withMaven() (which doesn't work anyway for multiple modules) you have two options: withMaven(publisherStrategy: 'EXPLICIT', options: [...] ) (don't add jacocoPublisher() to options) withMaven(options: [jacocoPublisher(disabled: true)] ,...)

          Falko Modler added a comment -

          This ticket should be closed as this is not happening anymore with pipeline-maven 3.5.15+ (see comments above).

          Falko Modler added a comment - This ticket should be closed as this is not happening anymore with pipeline-maven 3.5.15+ (see comments above).
          Cyrille Le Clerc made changes -
          Link New: This issue relates to JENKINS-54139 [ JENKINS-54139 ]

            ognjenb Ognjen Bubalo
            kengra Kent Granström
            Votes:
            6 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: