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

Jacoco plugin 2.2.0 hang if buildOverBuild is enabled

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: jacoco-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.52
      JaCoCo Plugin 2.2.0
    • Similar Issues:

      Description

      Run a project in the pipeline using the following Jenskinsfile and then the Jacoco plugin is loading forever after the last line is printed.

      node {
      sh './gradlew test --stacktrace'
      step([$class : 'JacocoPublisher',
      execPattern : '**/build/jacoco/*.exec',
      classPattern : '**/*.class',
      sourcePattern : '**/src/main/java',
      exclusionPattern : '**/R.class,**/R$*.class,**/BuildConfig.*,**/Manifest*.*,**/*Test*.class',
      
      minimumBranchCoverage : '45', maximumBranchCoverage: '50',
      minimumClassCoverage : '45', maximumClassCoverage: '50',
      minimumComplexityCoverage : '45', maximumComplexityCoverage: '50',
      minimumInstructionCoverage: '45', maximumInstructionCoverage: '50',
      minimumLineCoverage : '45', maximumLineCoverage: '50',
      minimumMethodCoverage : '45', maximumMethodCoverage: '50',
      
      buildOverBuild: true, deltaBranchCoverage: '1', deltaClassCoverage: '1', deltaComplexityCoverage: '1', deltaInstructionCoverage: '1', deltaLineCoverage: '1', deltaMethodCoverage: '1',
      ])
      }

       

      Console output:

      [Pipeline] step
      [JaCoCo plugin] Collecting JaCoCo coverage data...
      [JaCoCo plugin] **/build/jacoco/*.exec;**/*.class;**/src/main/java; locations are configured
      [JaCoCo plugin] Number of found exec files for pattern **/build/jacoco/*.exec: 2
      [JaCoCo plugin] Saving matched execfiles:  /Users/Shared/Jenkins/Home/workspace/test/app/build/jacoco/testDebugUnitTest.exec /Users/Shared/Jenkins/Home/workspace/test/app/build/jacoco/testReleaseUnitTest.exec
      [JaCoCo plugin] Saving matched class directories for class-pattern: **/*.class:
      [JaCoCo plugin] Saving matched source directories for source-pattern: **/src/main/java:
      [JaCoCo plugin] - /Users/Shared/Jenkins/Home/workspace/test/app/src/main/java 1 files
      [JaCoCo plugin] Loading inclusions files..
      [JaCoCo plugin] inclusions: []
      [JaCoCo plugin] exclusions: [**/R.class, **/R$*.class, **/BuildConfig.*, **/Manifest*.*, **/*Test*.class]
      [JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=45, maxClass=50, minMethod=45, maxMethod=50, minLine=45, maxLine=50, minBranch=45, maxBranch=50, minInstruction=45, maxInstruction=50, minComplexity=45, maxComplexity=50]
      [JaCoCo plugin] Publishing the results..
      [JaCoCo plugin] Loading packages..
      [JaCoCo plugin] Done.
      [JaCoCo plugin] Overall coverage: class: 100, method: 100, line: 100, branch: 100, instruction: 100
      [JaCoCo plugin] Loading packages..
      [JaCoCo plugin] Done.
      

        Attachments

          Activity

          Hide
          abishek3876 Abishek Manoharan added a comment -

          I am facing the same problem even WITHOUT the buildOverBuild setting. Were you able to find a workaround?

          Show
          abishek3876 Abishek Manoharan added a comment - I am facing the same problem even WITHOUT the buildOverBuild setting. Were you able to find a workaround?
          Hide
          filand Sam Ng added a comment -

          Yes, even turning on changeBuildStatus will have the same problem. Unfortunately, I can't find any workaround.

          Show
          filand Sam Ng added a comment - Yes, even turning on changeBuildStatus will have the same problem. Unfortunately, I can't find any workaround.
          Hide
          lorenzobettini Lorenzo Bettini added a comment -

          I can confirm that the culprit is changeBuildStatus; maybe we should change the name of the issue?

          Show
          lorenzobettini Lorenzo Bettini added a comment - I can confirm that the culprit is changeBuildStatus; maybe we should change the name of the issue?
          Hide
          centic centic added a comment -

          Can you fetch a stacktrace/threaddump from the jenkins server? Either manually or via some Jenkins debugging functionality?

          Show
          centic centic added a comment - Can you fetch a stacktrace/threaddump from the jenkins server? Either manually or via some Jenkins debugging functionality?

            People

            • Assignee:
              ognjenb Ognjen Bubalo
              Reporter:
              filand Sam Ng
            • Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: