From 4c63075797178555994ba54f46755d1228426028 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 6 Apr 2021 18:37:54 +0200 Subject: [PATCH] Add pass and unstablerobot thresholds for stage3 This change adds two parameters to the stage3 Jenkinsfile in ci_stage3_groovy: - ROBOT_PASS_THRESHOLD: % passed Robot tests to mark the build as passed - ROBOT_UNSTABLE_THRESHOLD: % passed Robot tests to mark the build as unstable These two parameters are passed to robotPublisher, the class in Robot Framework Jenkins plugin to publish test results. Change-Id: Ia2abdf996033163572836afe88cfa0675683fcb1 Signed-off-by: garciadeblas --- jenkins/ci-pipelines/ci_stage_3.groovy | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 5ebae21c..72cf2cd9 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -46,6 +46,8 @@ properties([ string(defaultValue: '/home/jenkins/hive/kubeconfig.yaml', description: '', name: 'KUBECONFIG'), string(defaultValue: '/home/jenkins/hive/clouds.yaml', description: '', name: 'CLOUDS'), string(defaultValue: 'Default', description: '', name: 'INSTALLER'), + string(defaultValue: '99.0', description: '% passed Robot tests to mark the build as passed', name: 'ROBOT_PASS_THRESHOLD'), + string(defaultValue: '80.0', description: '% passed Robot tests to mark the build as unstable (if lower, it will be failed)', name: 'ROBOT_UNSTABLE_THRESHOLD'), ]) ]) @@ -53,7 +55,7 @@ properties([ //////////////////////////////////////////////////////////////////////////////////////// // Helper Functions //////////////////////////////////////////////////////////////////////////////////////// -def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,kubeconfig=null,clouds=null,hostfile=null,jujuPassword=null) { +def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus_port=null,envfile=null,kubeconfig=null,clouds=null,hostfile=null,jujuPassword=null,pass_th='0.0',unstable_th='0.0') { tempdir = sh(returnStdout: true, script: "mktemp -d").trim() if ( !envfile ) { @@ -87,8 +89,8 @@ def run_robot_systest(tagName,testName,osmHostname,prometheusHostname,prometheus disableArchiveOutput : false, reportFileName : "report.html", logFileName : "log.html", - passThreshold : 0, - unstableThreshold: 0, + passThreshold : pass_th, + unstableThreshold: unstable_th, otherFiles : "*.png", ]) } -- 2.17.1