[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Liam Newman closed an issue as Fixed Bulk closing resolved issues. Jenkins / JENKINS-40984 A failure in post/always should not prevent the post/failure block to be called Change By: Liam Newman Status: Resolved Closed Add Comment This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.177715.1484126301000.16898.1571801058488%40Atlassian.JIRA.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title SCM/JIRA link daemon commented on JENKINS-40984 Re: A failure in post/always should not prevent the post/failure block to be called Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/AbstractBuildConditionResponder.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Root.groovy pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/model/Stage.groovy pipeline-model-definition/src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/model/BuildCondition.java pipeline-model-definition/src/main/resources/org/jenkinsci/plugins/pipeline/modeldefinition/ModelInterpreter.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BuildConditionResponderTest.java pipeline-model-definition/src/test/resources/postChecksAllConditions.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/c1a77937ed5557da7d8796011c13888c05b08c8c Log: [FIXED JENKINS-40984] Always evaluate/run all post conditions Even if there's an error in an earlier condition execution, continue to the subsequent ones. Additionally, switch to doing a one-off check at the beginning of the post section to see if any conditions are satisfied at that time, and then when actually iterating through the conditions, check for satisfaction at that time. That's so that, for example, if the build is successful when it gets to evaluating post conditions and then there's a failure in the execution of `always`, the `success` block won't be executed, and the `failure` block will, since the build status has changed. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Andrew Bayer updated JENKINS-40984 Jenkins / JENKINS-40984 A failure in post/always should not prevent the post/failure block to be called Change By: Andrew Bayer Status: In Review Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Andrew Bayer commented on JENKINS-40984 Re: A failure in post/always should not prevent the post/failure block to be called PR up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/90 Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Andrew Bayer updated JENKINS-40984 Jenkins / JENKINS-40984 A failure in post/always should not prevent the post/failure block to be called Change By: Andrew Bayer Status: In Progress Review Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Baptiste Mathus commented on JENKINS-40984 Re: A failure in post/always should not prevent the post/failure block to be called So, IIUC: you agree that if the pipeline fails (i.e. before the post/* things), then right now the behaviour is a bug, right? but in case post/always fails, then there's a question I think that, yes, if post/always fails, then it should just trigger whatever post/failure or post/unstable steps are defined. I seem this is the less surprising behaviour. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Andrew Bayer commented on JENKINS-40984 Re: A failure in post/always should not prevent the post/failure block to be called Changed my mind! Implementing now. Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Andrew Bayer commented on JENKINS-40984 Re: A failure in post/always should not prevent the post/failure block to be called My bias here is to still follow the previously satisfied conditions, but that's in part 'cos that's how the behavior would work right now. =) Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Andrew Bayer commented on JENKINS-40984 Re: A failure in post/always should not prevent the post/failure block to be called Interesting question this poses - if post/always fails, but the build was successful up until then, should post/failure be called or post/success? Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Andrew Bayer started work on JENKINS-40984 Change By: Andrew Bayer Status: Open In Progress Add Comment This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-40984) A failure in post/always should not prevent the post/failure block to be called
Title: Message Title Baptiste Mathus created an issue Jenkins / JENKINS-40984 A failure in post/always should not prevent the post/failure block to be called Issue Type: Bug Assignee: Andrew Bayer Components: pipeline-model-definition-plugin Created: 2017/Jan/11 9:18 AM Priority: Critical Reporter: Baptiste Mathus Hey o/ , If there's an error in some step of the post/always {} block, it seems like this will stop the processing of the post sub-steps. I put it Critical, but it almost seems like a blocker: this seems a common use case and counter-intuitive, so I hope you'll agree this is not expected/intended. Typical case: I want to always generate some reports (junit, say) I want to notify people *only* on failure If something goes wrong in always, still the failure notification should go out for instance. Reproduction code: pipeline { agent { label 'linux' } post { always { echo "ALWAYS THE SUN!!!" junit '**/nonexisting_to_make_this_fail/*.xml' } failure { echo "WE FAILED MISERABLY! I won't be shown because junit step failed above" } } stages { stage('bim') { steps { sh "echo bonjour" sh "exit 1" } } } }