github-pr-coverage-status-plugin icon indicating copy to clipboard operation
github-pr-coverage-status-plugin copied to clipboard

Not able to change value for "Jacoco coverage counter type"

Open smurugesh1686 opened this issue 6 years ago • 7 comments

We tried to change the value for "Jacoco coverage counter type" in "Publish coverage to GitHub" from "instruction" to "Line". But it new config changes are not getting changed and it is always considering "instruction".Please advise.

smurugesh1686 avatar Apr 03 '19 09:04 smurugesh1686

@smurugesh1686 are you using pipeline or freestyle job? can you show how are you configuring the plugin?

dmotpan avatar Apr 03 '19 10:04 dmotpan

@dmotpan: It is a freestyle job. JOB Config: image

smurugesh1686 avatar Apr 03 '19 10:04 smurugesh1686

I am experiencing the same issue. Also, I am not sure how instruction coverage is being calculated.

xitter avatar May 09 '19 18:05 xitter

I am experiencing the same issue with a multi-branch pipeline. I have the following line in my Jenkinsfile

step( [ $class: 'CompareCoverageAction', jacocoCounterType: 'LINE', publishResultAs: 'comment', scmVars: [GIT_URL: env.GIT_URL] ] )

asrajmane193 avatar Jun 27 '19 10:06 asrajmane193

I am experiencing the same issue, it appears to be an issue with the UI in Jenkins. We are running Jenkins on Windows.

  1. Open a build
  2. Set the coverage to Complexity & Status Check
  3. Save
  4. View Job Config History, note it saved correctly

<com.github.terma.jenkins.githubprcoveragestatus.CompareCoverageAction plugin="[email protected]"> <jacocoCoverageCounter>COMPLEXITY</jacocoCoverageCounter> <publishResultAs>statusCheck</publishResultAs> </com.github.terma.jenkins.githubprcoveragestatus.CompareCoverageAction>

  1. Reopen the same build config
  2. Note the dropdowns display Instruction and Comment unexpectedly and not matching step 4.
  3. Change an unrelated element somewhere else in the config and click save.
  4. View "Job Config History" again. Note it has reverted to Instruction and Comment

<com.github.terma.jenkins.githubprcoveragestatus.CompareCoverageAction plugin="[email protected]"> <jacocoCoverageCounter>INSTRUCTION</jacocoCoverageCounter> <publishResultAs>comment</publishResultAs> </com.github.terma.jenkins.githubprcoveragestatus.CompareCoverageAction>

amhest avatar Dec 10 '19 16:12 amhest

I think I found the root cause here: https://stackoverflow.com/questions/28972175/values-not-persisting-in-dropdown-of-optional-block-jelly-jenkins

Will try and create a PR.

amhest avatar Dec 10 '19 16:12 amhest

Is this issue fixed? I am still facing this issue.

smurugesh1686 avatar May 26 '21 08:05 smurugesh1686