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

Jenkinsfile: post failure is not working with parallel step

    XMLWordPrintable

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      Declarative - 1.2

      Description

      Hello,

      I´m trying to do a pipeline with a parallel step and a post failure action. This the jenkinsfile´s content:

      pipeline {
      agent any

      stages {

      stage("test") {

      steps

      { sh 'exit 1' }

      }

      stage("parallel") {
      steps {
      parallel (
      phase1:

      { sh 'echo phase1'}

      ,
      phase2:

      { sh "echo phase2" }

      )
      }
      }

      }

      post {

      failure

      { echo "FAIL" }

      }
      }

      The pipeline fails but the post failure action doesn´t appear by any place. For example, if in place of a post failure action, i use a post succes action, it works fine.

      Thanks!

        Attachments

          Activity

          Hide
          majano Daniel Majano added a comment -

          some news with this Andrew Bayer ?

          Show
          majano Daniel Majano added a comment - some news with this Andrew Bayer ?
          Hide
          abayer Andrew Bayer added a comment -

          Huh, weird - will investigate.

          Show
          abayer Andrew Bayer added a comment - Huh, weird - will investigate.
          Hide
          abayer Andrew Bayer added a comment -

          Can't reproduce this...putting up a PR with a test verifying that this works.

          Show
          abayer Andrew Bayer added a comment - Can't reproduce this...putting up a PR with a test verifying that this works.
          Hide
          abayer Andrew Bayer added a comment -

          Daniel Majano Are you still having this problem? What version of Declarative do you have installed?

          Show
          abayer Andrew Bayer added a comment - Daniel Majano Are you still having this problem? What version of Declarative do you have installed?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
          pipeline-model-definition/src/test/resources/parallelAndPostFailure.groovy
          http://jenkins-ci.org/commit/pipeline-model-definition-plugin/8407d2fbd0798af51f89e39c77e94361ff55e268
          Log:
          JENKINS-43625 Test attempting to reproduce bug - passes, though

          So this matches the reported bug but does not reproduce it. Still
          thought it was worth adding the test anyway.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java pipeline-model-definition/src/test/resources/parallelAndPostFailure.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/8407d2fbd0798af51f89e39c77e94361ff55e268 Log: JENKINS-43625 Test attempting to reproduce bug - passes, though So this matches the reported bug but does not reproduce it. Still thought it was worth adding the test anyway.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
          pipeline-model-definition/src/test/resources/parallelAndPostFailure.groovy
          http://jenkins-ci.org/commit/pipeline-model-definition-plugin/6c65ef8bb0b186f0d1b9c1c81a6bf40e61e1b56d
          Log:
          Merge pull request #169 from abayer/jenkins-43625

          JENKINS-43625 Test attempting to reproduce bug - passes, though

          Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/160933933ef1...6c65ef8bb0b1

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java pipeline-model-definition/src/test/resources/parallelAndPostFailure.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/6c65ef8bb0b186f0d1b9c1c81a6bf40e61e1b56d Log: Merge pull request #169 from abayer/jenkins-43625 JENKINS-43625 Test attempting to reproduce bug - passes, though Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/160933933ef1...6c65ef8bb0b1
          Hide
          bitwiseman Liam Newman added a comment -

          Bulk closing resolved issues.

          Show
          bitwiseman Liam Newman added a comment - Bulk closing resolved issues.

            People

            Assignee:
            abayer Andrew Bayer
            Reporter:
            majano Daniel Majano
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: