-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
OS: Ubuntu 14.04
Jenkins: 2.67
pipeline-model-definition-plugin 1.2.4
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