X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_1.groovy;fp=jenkins%2Fci-pipelines%2Fci_stage_1.groovy;h=ea221cf69050d934c40bdc4acc317acf8b161126;hb=852a07d1b4a177726be0de5a364fc066839359b8;hp=722f9c9a57f1785d11f081eca70ad667be6725be;hpb=7273dfbd2fc018915a5f68baf52dbfe86a8e0acb;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_1.groovy b/jenkins/ci-pipelines/ci_stage_1.groovy index 722f9c9a..ea221cf6 100644 --- a/jenkins/ci-pipelines/ci_stage_1.groovy +++ b/jenkins/ci-pipelines/ci_stage_1.groovy @@ -101,12 +101,13 @@ node("${params.NODE}") { // error("${project} build ${build} failed") } } - catch (caughtError) { + catch(caughtError) { echo 'Exception in stage_1' currentBuild.result = 'FAILURE' } finally { - if((${currentBuild.result} != 'SUCCESS') && (${env.JOB_NAME} == 'daily-stage_4')){ + 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}" """, @@ -114,6 +115,10 @@ node("${params.NODE}") { recipientProviders: [culprits()] ) } + } + catch(caughtError) { + echo "Failure in executing email" + } } }