Bug 883 - Disable build failure due to stage_4 robot test results
[osm/devops.git] / jenkins / ci-pipelines / ci_stage_3.groovy
index 99ba600..e37cf20 100644 (file)
@@ -93,8 +93,8 @@ def run_robot_systest(stackName,tagName,testName,envfile=null) {
         disableArchiveOutput : false,
         reportFileName : "report.html",
         logFileName : "log.html",
-        passThreshold : 80,
-        unstableThreshold: 60.0,
+        passThreshold : 0,
+        unstableThreshold: 0,
         otherFiles : "*.png",
     ])
 }
@@ -309,21 +309,19 @@ node("${params.NODE}") {
                 stage_archive = false
                 stage("System Integration Test") {
                     if ( params.DO_ROBOT ) {
-                        steps {
-                            run_robot_systest(container_name,container_name,params.TEST_NAME,params.ROBOT_VIM)
-                        }
-                    } else {
-                        steps{
-                            run_systest(container_name,container_name,"openstack_stage_4",params.HIVE_VIM_1)
-                        }
-                    }
+                        run_robot_systest(container_name,container_name,params.TEST_NAME,params.ROBOT_VIM)
+                    } //else {
+                    run_systest(container_name,container_name,"openstack_stage_4",params.HIVE_VIM_1)
+                    //}
 
-                    if ( ! currentBuild.result.equals('UNSTABLE') ) {
+                    if ( ! currentBuild.result.equals('UNSTABLE') && ! currentBuild.result.equals('FAILURE')) {
                         stage_archive = keep_artifacts
                     } else {
-                                          error = new Exception("Systest test failed")
-                                          currentBuild.result = 'FAILURE'
-                                       }
+                        println ("Systest test failed, throwing error")
+                        error = new Exception("Systest test failed")
+                        currentBuild.result = 'FAILURE'
+                        throw error
+                    }
                 }
             }
 
@@ -345,10 +343,11 @@ node("${params.NODE}") {
                 }
             }
         }
-        catch(caughtError) {
-            println("Caught error!")
-            error = caughtError
+        catch(Exception ex) {
+            error = ex
             currentBuild.result = 'FAILURE'
+            println("Caught error")
+            println(ex.getMessage());
         }
         finally {
             if ( params.DO_INSTALL ) {
@@ -358,7 +357,6 @@ node("${params.NODE}") {
                         sh "docker stop ${http_server_name}"
                         sh "docker rm ${http_server_name}"
                     }
-                    throw error 
                 }
                 else {
                     if ( !params.SAVE_CONTAINER_ON_PASS ) {