Pós-falha JenkinsFile não está funcionando
Estou tentando uma ação pós-falha com uma etapa paralela, mas ela nunca funciona.
Este é o meu JenkinsFile:
pipeline {
agent any
stages {
stage("test") {
steps {
withMaven(
maven: 'maven3', // Maven installation declared in the Jenkins "Global Tool Configuration"
mavenSettingsConfig: 'maven_id', // Maven settings.xml file defined with the Jenkins Config File Provider Plugin
mavenLocalRepo: '.repository') {
// Run the maven build
sh "mvn --batch-mode release:prepare -Dmaven.deploy.skip=true" --> it will always fail
}
}
}
stage("testing") {
steps {
parallel (
phase1: { sh 'echo phase1'},
phase2: { sh "echo phase2" }
)
}
}
}
post {
failure {
echo "FAIL"
}
}
}
Mas a ação pós-falha aqui é um pouco inútil ... eu não vejo em nenhum lugar.
Obrigado a todos! Saudações