-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: pipeline-model-definition-plugin
-
Labels:None
-
Environment:OS: Ubuntu 14.04
Jenkins: 2.67
pipeline-model-definition-plugin 1.2.4
-
Similar Issues:
When a pipeline stage fails, subsequent stages execute their "failure" post steps even if they are skipped. This only occurs for stages which host parallel child stages.
Example:
pipeline { agent none stages { stage('One') { agent any steps { error('fail') } post { failure { echo 'One' } } stage('Two') { agent any steps { echo "Shouldn't run" } post { failure { echo 'Two' } } } stage('Three') { parallel { stage('Child 1') { agent any steps { echo 'Child 1' } } stage('Child 2') { agent any steps { echo 'Chlid 2' } } } post { failure { echo 'Three' } } } } }
This will echo:
One Three
Field | Original Value | New Value |
---|---|---|
Description |
When a pipeline stage fails, subsequent stages execute their "failure" post steps even if they are skipped. This only occurs for stages which host parallel child stages.
Example: {code:java} pipeline { agent none stages { stage('One') { agent any steps { error('fail') } post { failure { echo 'One' } } stage('Two') { agent any steps { echo "Shouldn't run" } post { failure { echo 'Two' } } } stage('Three') { parallel { stage('Child 1') { agent any steps { echo 'Child 1' } } stage('Child 2') { agent any steps { echo 'Chlid 2' } } } post { failure { echo 'Three' } } } } }{code} |
When a pipeline stage fails, subsequent stages execute their "failure" post steps even if they are skipped. This only occurs for stages which host parallel child stages.
Example: {code:java} pipeline { agent none stages { stage('One') { agent any steps { error('fail') } post { failure { echo 'One' } } stage('Two') { agent any steps { echo "Shouldn't run" } post { failure { echo 'Two' } } } stage('Three') { parallel { stage('Child 1') { agent any steps { echo 'Child 1' } } stage('Child 2') { agent any steps { echo 'Chlid 2' } } } post { failure { echo 'Three' } } } } }{code} This will echo: {noformat} One Three {noformat} |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Merged, will be released in 1.2.5.