From 3f9de719d00ae0133f0507fe3de38934b066cd73 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Thu, 28 Apr 2022 16:44:59 +0200 Subject: [PATCH] add dynamic deploy stages to system stage --- Jenkinsfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 31fd4f8..d887364 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -73,12 +73,15 @@ pipeline { def components = parseCSVList(deployList) assert 0 < components.size(): "No component found" for (component in components) { - println "Deploy on going of component: $component" + stage(component){ + println "Deploy on going of component: $component" + catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { + sh "exit 0" + } + + } } } - catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { - sh "exit 0" - } sh ''' echo "cleanup $DEPLOY_FILE"; if [ -f ${BACKUP_FILE} ]; then