Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
smurugesh1686 opened this issue Apr 3, 2019 · 7 comments
Open

Comments

@smurugesh1686
Copy link

smurugesh1686 commented Apr 3, 2019

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
Copy link
Collaborator

dmotpan commented Apr 3, 2019

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

@smurugesh1686
Copy link
Author

smurugesh1686 commented Apr 3, 2019

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

@xitter
Copy link

xitter commented May 9, 2019

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

@asrajmane193
Copy link

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
Copy link

amhest commented Dec 10, 2019

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
Copy link

amhest commented Dec 10, 2019

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants