jenkinsci / github-pr-coverage-status-plugin

Nice test coverage icon for your pull requests just from Jenkins
https://plugins.jenkins.io/github-pr-coverage-status/
Apache License 2.0
93 stars 101 forks source link

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

Open smurugesh1686 opened 5 years ago

smurugesh1686 commented 5 years ago

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.

dmotpan commented 5 years ago

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

smurugesh1686 commented 5 years ago

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

xitter commented 5 years ago

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

asrajmane193 commented 5 years ago

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] ] )
amhest commented 4 years ago

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

`

COMPLEXITY statusCheck

</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

`

INSTRUCTION comment

</com.github.terma.jenkins.githubprcoveragestatus.CompareCoverageAction>`

amhest commented 4 years ago

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.

smurugesh1686 commented 3 years ago

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