question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is autoUpdateHealth, autoUpdateStability supported with Jenkins pipeline?

See original GitHub issue

I noticed that the syntax generator for the plugin that when I check off autoUpdateStability and autoUpdateHealth the options are left out of my final syntax.

When false:

step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'coverage.xml', maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false])

When true:

step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: 'coverage.xml', maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false])

Which made me question if this was supported in pipeline? I’ve had some trouble validating regressions.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
sirsavarycommented, May 9, 2018

Attempting to get ratcheting working with no luck. Jenkinsfile post-build step looks like:

post {
        always {
            junit "**/xunit.xml"
            cobertura coberturaReportFile: "**/cobertura-coverage.xml"
            cleanWs()
        }
    }

Output from build #1:

[Cobertura] Publishing Cobertura coverage report...
[Cobertura] Publishing Cobertura coverage results...
[Cobertura] Cobertura coverage report found.
    Methods's new health minimum is: 2.91
    Lines's new health minimum is: 12.62
    Conditionals's new health minimum is: 0.64
    Methods's new stability minimum is: 2.91
    Lines's new stability minimum is: 12.62
    Conditionals's new stability minimum is: 0.64

Output from build #2:

[Cobertura] Publishing Cobertura coverage report...
[Cobertura] Publishing Cobertura coverage results...
[Cobertura] Cobertura coverage report found.
    Methods's new health minimum is: 2.91
    Lines's new health minimum is: 10.83
    Conditionals's new health minimum is: 0.67
    Methods's new stability minimum is: 2.91
    Lines's new stability minimum is: 10.83
    Conditionals's new stability minimum is: 0.67

I’m not sure if the values aren’t persisting or if I’m misunderstanding how this feature is intended to work.

0reactions
jeffpearcecommented, May 7, 2018

You can see the full syntax from the Pipeline Syntax link:

screenshot 2018-05-07 09 10 08

Most options are optional, all you really need is cobertura coberturaReportFile: '*.xml'

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cobertura Plugin - Jenkins
Read more about how to integrate steps into your Pipeline in the Steps section of ... autoUpdateHealth : boolean (optional); autoUpdateStability : boolean ......
Read more >
Jenkins Cobertura Plugin - reset Ratcheting ... - Stack Overflow
I figured that building with autoUpdateHealth: false and autoUpdateStability: false will at least ignore the ratcheted values. Not sure if it ...
Read more >
Is Cobertura available in pipeline yet? : r/jenkinsci - Reddit
I tried the following command: step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile…
Read more >
call a Jenkins plugin from a pipeline - Google Groups
I would like to know if I can call some other Jenkins plugins from the Jenkinsfile. ... The JUnit plugin has been extended...
Read more >
Cobertura code coverage report for jenkins pipeline jobs
I'm using the pipeline plugin for jenkins and I'd like to generate code ... autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found