X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=1ef8ce5d996373b4f8bb9b2010f9173c66ee1e9c;hb=bc31dab809b1a3cb9d1bd1de679ad662c776c4aa;hp=99ba6004fd6c4cec4f0ff39c329f54eb9b831339;hpb=93a23a88b386b64d6692f61a4bbf0b2221bbc53d;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 99ba6004..1ef8ce5d 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -49,7 +49,7 @@ properties([ booleanParam(defaultValue: true, description: '', name: 'DO_DOCKERPUSH'), booleanParam(defaultValue: false, description: '', name: 'SAVE_ARTIFACTS_OVERRIDE'), string(defaultValue: '/home/jenkins/hive/openstack-etsi.rc', description: '', name: 'HIVE_VIM_1'), - booleanParam(defaultValue: true, description: '', name: 'DO_ROBOT'), + booleanParam(defaultValue: false, description: '', name: 'DO_ROBOT'), string(defaultValue: 'sanity', description: 'smoke/vim/sanity/comprehensive are the options', name: 'TEST_NAME'), string(defaultValue: '/home/jenkins/hive/robot-systest.cfg', description: '', name: 'ROBOT_VIM'), ]) @@ -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,20 +309,18 @@ 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 { + 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 ) {