From 1e7cc42c84ae82627667973254fafda30104a5ac Mon Sep 17 00:00:00 2001 From: Adam Saleh Date: Wed, 14 Feb 2018 13:40:48 +0100 Subject: [PATCH] Added option to run long tests --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5999d38..8bfc334 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,12 +60,15 @@ podTemplate(label: 'mobile-cli-go', cloud: "openshift", containers: [goSlaveCont sh "./mobile" } - /*TestLabel*/ - stage ("Integration") { sh "oc project ${project}" sh "go test -timeout 30m -c ./integration" - sh "./integration.test -test.short -test.v -prefix=test-${sanitizeObjectName(env.BRANCH_NAME)}-build-$BUILD_NUMBER -namespace=`oc project -q` -executable=`pwd`/mobile" + def labels = getPullRequestLabels {} + def test_short = "-test.short" + if(labels.contains("run long tests")){ + test_short = "" + } + sh "./integration.test ${test_short} -test.v -prefix=test-${sanitizeObjectName(env.BRANCH_NAME)}-build-$BUILD_NUMBER -namespace=`oc project -q` -executable=`pwd`/mobile" } stage ("Archive") {