ci_stage_1.groovy: clean-up indentation 42/10142/5
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 16 Dec 2020 16:05:34 +0000 (16:05 +0000)
committerbeierlm <mark.beierl@canonical.com>
Wed, 20 Jan 2021 10:45:18 +0000 (11:45 +0100)
Change-Id: I0745dc2e4dfd94b17b2403542e2aae3023530bb8
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
jenkins/ci-pipelines/ci_stage_1.groovy

index 53466f7..0f530c5 100644 (file)
@@ -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"
+            }
+        }
+    }
+}
 
-       
- }