remove multiple steps from stage

This commit is contained in:
Roberto Cirillo 2022-04-28 15:22:49 +02:00
parent d638ec5d4f
commit c0164b40f0
1 changed files with 18 additions and 23 deletions

41
Jenkinsfile vendored
View File

@ -66,32 +66,27 @@ pipeline {
}
}
steps {
echo 'Cron build enabled. Deploy from system ongoing'
script {
// parse the report and extract the data
def components = parseCSVList(deployList)
assert 0 < components.size(): "No component found"
for (component in components) {
println "Deploy on going of component: $component"
}
}
}
steps {
echo 'Cron build enabled. Deploy from system ongoing'
script {
// parse the report and extract the data
def components = parseCSVList(deployList)
assert 0 < components.size(): "No component found"
for (component in components) {
println "Deploy on going of component: $component"
}
}
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh "exit 1"
}
}
steps {
sh '''
echo "cleanup $DEPLOY_FILE";
if [ -f ${DEPLOY_BACKUP} ]; then
echo "backup found: ${DEPLOY_BACKUP} going to replace it";
rm ${DEPLOY_BACKUP};
mv ${DEPLOY_FILE} ${DEPLOY_BACKUP};
touch ${DEPLOY_FILE};
fi
'''
sh '''
echo "cleanup $DEPLOY_FILE";
if [ -f ${DEPLOY_BACKUP} ]; then
echo "backup found: ${DEPLOY_BACKUP} going to replace it";
rm ${DEPLOY_BACKUP};
mv ${DEPLOY_FILE} ${DEPLOY_BACKUP};
touch ${DEPLOY_FILE};
fi
'''
}
}
stage('Nothing to do by System ') {