From: yadavmr Date: Wed, 13 Nov 2019 06:57:07 +0000 (+0530) Subject: Bug 883 - Disable build failure due to stage_4 robot test results X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=86bb9f6be89b225f10468bbb232cdb4c5968c144;p=osm%2Fdevops.git Bug 883 - Disable build failure due to stage_4 robot test results Change-Id: I0170cd0b890c27810efc90acd15f2831b918f4bc Signed-off-by: yadavmr --- diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index e0d6e059..0b18b061 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -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", ]) } @@ -310,16 +310,20 @@ node("${params.NODE}") { stage("System Integration Test") { if ( params.DO_ROBOT ) { 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) - } + println ("Robot Test Build Result : ${currentBuild.result}") + } //else { + run_systest(container_name,container_name,"openstack_stage_4",params.HIVE_VIM_1) + println ("Py Test Build Result : ${currentBuild.result}") + //} - 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 + } } } @@ -341,10 +345,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 ) { @@ -354,7 +359,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 ) {