From d638ec5d4f8818990b27ea76014fd405af922b46 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Thu, 28 Apr 2022 15:17:22 +0200 Subject: [PATCH] add catcherror test step --- Jenkinsfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 28fb4de..9fe7736 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,6 +76,13 @@ pipeline { } } + } + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh "exit 1" + } + } + steps { sh ''' echo "cleanup $DEPLOY_FILE"; if [ -f ${DEPLOY_BACKUP} ]; then