Después de la falla JenkinsFile no funciona
Estoy intentando una acción posterior a la falla con un paso paralelo pero nunca funciona.
Este es mi archivo Jenkins:
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"
}
}
}
Pero la acción posterior al fallo aquí es un poco inútil ... No lo veo en ningún lugar.
¡Gracias a todos! Saludos