Jenkinsfile: Force the cleanup after stages are aborted

Problem with the previous solution was that Cleanup stage was not
executed when previous stages failed. We fix this by adding a post
section that executes always after the Aarch64 build completed, no
matter if it has failed, succeeded or been aborted.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2020-08-19 14:15:36 +02:00 committed by Bo Chen
parent cd0b8ed8f8
commit d751f419de

13
Jenkinsfile vendored
View File

@ -84,6 +84,12 @@ pipeline{
}
}
}
post {
always {
sh "sudo chown -R jenkins.jenkins ${WORKSPACE}"
deleteDir()
}
}
}
stage ('Worker build (musl)') {
agent { node { label 'bionic' } }
@ -110,13 +116,6 @@ pipeline{
}
}
}
stage ('Cleanup') {
agent { node { label 'bionic-arm64' } }
steps {
sh "sudo chown -R jenkins.jenkins ${WORKSPACE}"
deleteDir()
}
}
}
post {
regression {