-
Bug
-
Resolution: Unresolved
-
Major
-
None
Hi there,
I've just started to see an unexpected behaviour when using failFast: false, since the post-failure nested stage in the matrix gets executed for the stages that did run successfully.
To illustrate the above, I use the above snippet:
stage(..) {
options { skipDefaultCheckout() }
failFast false
matrix {
agent { .. }
axes {
axis { .. }
}
stages {
stage(..){
steps { .. }
post {
failure { .. }
}
}
}
}
}
What do I see? for instance, given the below screenshot
The `selected terraform stage` runs the below snippet
stage('Terraform') { options { skipDefaultCheckout() } steps { withGithubNotify(context: "Terraform ${ELASTIC_STACK_VERSION} ${OS_VERSION}") { withCloudEnv() { withAzEnv() { sh(label: 'Run terraform plan', script: 'make -C .ci terraform-run') } } } echo "DEBUG status in stage - ${currentBuild.getCurrentResult()}" } post { always { echo "DEBUG status in post-always-stage - ${currentBuild.getCurrentResult()}" } failure { echo "DEBUG status in post-failure-stage - ${currentBuild.getCurrentResult()}" destroyTerraform() destroyCluster() } } }
And somehow, the `terraform` stage is able to execute the last step `echo "DEBUG status in stage - ${currentBuild.getCurrentResult()}"`
While, the stage itself didn't fail at all :/
If you need further details, the existing pipeline runs in a public accessible jenkins controller:
- https://github.com/elastic/azure-vm-extension/pull/22
- https://beats-ci.elastic.co/blue/organizations/jenkins/Beats%2Fazure-vm-extension-mbp%2FPR-22/detail/PR-22/3/pipeline/
Existing configuration:
- Jenkins core: 2.289.1
- Jenkins plugins: Declarative model -> 1.8.5 (the remaining list of plugins can be found in https://beats-ci.elastic.co/pluginusage/)
- If you need the OS and JDK version please let me know, I will not add those details here for the time being to avoid any security stuff