generated from gCubeCI/Pipeline-Docker-Template
split catcherror in order to manage differents cases
This commit is contained in:
parent
4ab3535e90
commit
c9af197c68
|
@ -203,10 +203,12 @@ pipeline {
|
|||
echo '\033[31;1;4mNew upstream deploy ongoing\033[0m'
|
||||
echo "Cron build disabled. Component: ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION}"
|
||||
ansiColor('xterm') {
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||
checkup("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}");
|
||||
deploy("${params.TRIGGER_JOB}", "${params.TRIGGER_VERSION}", "${params.TRIGGER_HOST}", "${params.TRIGGER_FOO}");
|
||||
}
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||
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}", "${params.TRIGGER_FOO}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -332,10 +334,12 @@ def deployJobs(def serviceList){
|
|||
service=record.split(",");
|
||||
stage(service[0]){
|
||||
println("Processing deploy: "+service[ 0 ])
|
||||
// catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||
checkup(service[0], service[ 1 ], service[2]);
|
||||
}
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
deploy(service[0], service[ 1 ], service[2]);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue