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

Support post conditions that accept a range of stage statuses

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      For users of declarative pipeline, there are problems with coding 'post' conditions to handle stages that might come up as UNSTABLE rather than SUCCESS if a test fails. This means if a stage is unstable, then the 'success' condition will break. See example: https://issues.jenkins.io/browse/JENKINS-39203?focusedCommentId=350537&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-350537

      Solving this requires writing separate post conditions for each possible status.

      Instead, it would be very good to support a 'statusGreaterThanOrEqual' condition that takes a Result code and runs if it's better than it (and perhaps statusLessThan, etc).

        Attachments

          Issue Links

            Activity

            Hide
            svanoort Sam Van Oort added a comment -

            The worst aspects of the unstable status handling are resolved by this.

            Show
            svanoort Sam Van Oort added a comment - The worst aspects of the unstable status handling are resolved by this.
            Hide
            abayer Andrew Bayer added a comment -

            post has some design flaws - most notably that it can't take parameters. So we can implement unstableOrBetter, but not statusOrBetter(SOME_STATUS), fyi.

            Show
            abayer Andrew Bayer added a comment - post has some design flaws - most notably that it can't take parameters. So we can implement unstableOrBetter , but not statusOrBetter(SOME_STATUS) , fyi.
            Hide
            svanoort Sam Van Oort added a comment -

            Andrew Bayer That would work - probably unstableOrBetter, and failureOrWorse would do the trick for 95% of users.

            Show
            svanoort Sam Van Oort added a comment - Andrew Bayer That would work - probably unstableOrBetter, and failureOrWorse would do the trick for 95% of users.

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                svanoort Sam Van Oort
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: