set build to SUCCESS and stage to FAILURE if the version doesn't contain

SNAPSHOT, in deploy from upstream case; remove SNAPSHOT check on deploy
manually stage
This commit is contained in:
Roberto Cirillo 2022-09-08 10:28:09 +02:00
parent f6b9b58930
commit cc890e4b8b
1 changed files with 3 additions and 2 deletions

5
Jenkinsfile vendored
View File

@ -169,8 +169,10 @@ pipeline {
steps {
echo "Cron build disabled. New deploy of ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION} ongoing"
ansiColor("xterm") {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
checkup("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
}
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
deploy("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
}
}
@ -188,7 +190,6 @@ pipeline {
echo "Cron build disabled. Pipeline executed Manually. New deploy of ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION} ongoing"
ansiColor("xterm") {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
checkup("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
deploy("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
}
}