From: garciadeblas Date: Wed, 16 Dec 2020 16:05:34 +0000 (+0000) Subject: ci_stage_1.groovy: clean-up indentation X-Git-Tag: branch-sol006v331-start~70 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fdevops.git;a=commitdiff_plain;h=f1492c324f3be50c6a7b3d421b7f040ac8d1c8fe ci_stage_1.groovy: clean-up indentation Change-Id: I0745dc2e4dfd94b17b2403542e2aae3023530bb8 Signed-off-by: garciadeblas --- diff --git a/jenkins/ci-pipelines/ci_stage_1.groovy b/jenkins/ci-pipelines/ci_stage_1.groovy index 53466f75..0f530c52 100644 --- a/jenkins/ci-pipelines/ci_stage_1.groovy +++ b/jenkins/ci-pipelines/ci_stage_1.groovy @@ -96,7 +96,7 @@ node("${params.NODE}") { println("TEST_INSTALL = ${params.TEST_INSTALL}, downstream job: ${downstream_job_name}") currentBuild.result = 'SUCCESS' try { - stage_3_merge_result = build job: "${downstream_job_name}", parameters: downstream_params, propagate: true + stage_3_merge_result = build job: "${downstream_job_name}", parameters: downstream_params, propagate: true if (stage_3_merge_result.getResult() != 'SUCCESS') { project = stage_3_merge_result.getProjectName() build = stage_3_merge_result.getNumber() @@ -104,28 +104,26 @@ node("${params.NODE}") { // error("${project} build ${build} failed") currentBuild.result = stage_3_merge_result.getResult() } - } - catch(caughtError) { - echo 'Exception in stage_1' - currentBuild.result = 'FAILURE' - } - finally { - try { - if((currentBuild.result != 'SUCCESS') && (env.JOB_NAME == 'daily-stage_4')){ - emailext ( - subject: "[OSM-Jenkins] Job: ${env.JOB_NAME} Build: ${env.BUILD_NUMBER} Result: ${currentBuild.result}", - body: """ Check console output at "${env.BUILD_URL}" """, - to: 'OSM_MDL@list.etsi.org', - recipientProviders: [culprits()] - ) + } + catch(caughtError) { + echo 'Exception in stage_1' + currentBuild.result = 'FAILURE' + } + finally { + try { + if((currentBuild.result != 'SUCCESS') && (env.JOB_NAME == 'daily-stage_4')){ + emailext ( + subject: "[OSM-Jenkins] Job: ${env.JOB_NAME} Build: ${env.BUILD_NUMBER} Result: ${currentBuild.result}", + body: """ Check console output at "${env.BUILD_URL}" """, + to: 'OSM_MDL@list.etsi.org', + recipientProviders: [culprits()] + ) + } } - } - catch(caughtError) { - echo "Failure in executing email" - } - - } - } + catch(caughtError) { + echo "Failure in executing email" + } + } + } +} - - }