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

Jenkinsfile: post failure is not working with parallel step

XMLWordPrintable

    • Declarative - 1.2

      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!

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

              Created:
              Updated:
              Resolved: