[JIRA] (JENKINS-50719) Declarative Pipeline: if one child of parallel failed, all next childs trigger failure in post

1 view
Skip to first unread message

sergii.kremko@gmail.com (JIRA)

unread,
Apr 10, 2018, 11:45:02 AM4/10/18
to jenkinsc...@googlegroups.com
Sergii Kremko created an issue
 
Jenkins / Bug JENKINS-50719
Declarative Pipeline: if one child of parallel failed, all next childs trigger failure in post
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2018-04-10 15:44
Environment: Jenkins ver. 2.111
pipeline-model-definition-plugin 1.2.7
Priority: Major Major
Reporter: Sergii Kremko

If one of parallel's child failed, in post of next childs will trigerred failure even this stages success 
 
Example:

pipeline {
    stages {
        stage('Paralel'){
            parallel {
                stage('One'){
                    agent any
                    steps{
                        echo "child one"
                    }
                    post{
                        failure{
                            echo "FAIL ONE"
                        }
                    }
                }
                stage ('Two'){
                    agent any
                    steps{
                        echo "child two"
                        error('fail')
                    }
                    post{
                        failure{
                            echo "FAIL TWO"
                        }
                    }
                }
                stage ('Three'){
                    agent any
                    steps{
                        echo "child three"
                    }
                    post{
                        failure{
                            echo "FAIL THREE"
                        }
                    }
                }
                stage ('Four'){
                    agent any
                    steps{
                        echo "child four"
                    }
                    post{
                        failure{
                            echo "FAIL FOUR"
                        }
                    }
                }
            }
            post {
                failure {
                    echo "FAIL PARALLEL"
                }
            }
        }
    }
}

Output:

child one
child two
child three
child four
FAIL TWO
FAIL THREE
FAIL FOUR
FAIL PARALLEL
Finished: FAILURE
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

sergii.kremko@gmail.com (JIRA)

unread,
Apr 10, 2018, 11:46:03 AM4/10/18
to jenkinsc...@googlegroups.com
Sergii Kremko updated an issue
Change By: Sergii Kremko
If one of {{parallel}}'s child failed, in {{post}} of next childs will trigerred triger {{failure}} even this stages {{success}} 
 
Example:
{code:java}
{code}

Output:
{code
:java }

child one
child two
child three
child four
FAIL TWO
FAIL THREE
FAIL FOUR
FAIL PARALLEL
Finished: FAILURE
{code}

andrew.bayer@gmail.com (JIRA)

unread,
Apr 12, 2018, 1:25:03 PM4/12/18
to jenkinsc...@googlegroups.com
Andrew Bayer resolved as Not A Defect
 

That's the expected behavior, sadly - post is checking the build status, not the result of an individual stage. Currently, stages don't have any more granular status than pass/fail, and there's no way to do changed/etc comparisons against previous builds, so this is as good as we can do at this point. Sorry.

Change By: Andrew Bayer
Status: Open Resolved
Resolution: Not A Defect

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:00 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Not A Defect
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages