Skip to content

Commit fd00eb1

Browse files
authored
Merge pull request #77 from AdamSaleh/LabelUtil
Option to run all tests by adding "run long tests" label
2 parents 93d2941 + 12acd3e commit fd00eb1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Jenkinsfile

+9-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,15 @@ podTemplate(label: 'mobile-cli-go', cloud: "openshift", containers: [goSlaveCont
6363
stage ("Integration") {
6464
sh "oc project ${project}"
6565
sh "go test -timeout 30m -c ./integration"
66-
sh "./integration.test -test.short -test.v -prefix=test-${sanitizeObjectName(env.BRANCH_NAME)}-build-$BUILD_NUMBER -namespace=`oc project -q` -executable=`pwd`/mobile"
66+
def labels = getPullRequestLabels {}
67+
def test_short = "-test.short"
68+
if(labels.contains("run long tests")){
69+
test_short = ""
70+
print "Will run the full integration test-suite"
71+
} else {
72+
print "Will run the integration test-suite with -test.short flag"
73+
}
74+
sh "./integration.test ${test_short} -test.v -prefix=test-${sanitizeObjectName(env.BRANCH_NAME)}-build-$BUILD_NUMBER -namespace=`oc project -q` -executable=`pwd`/mobile"
6775
}
6876

6977
stage ("Archive") {

0 commit comments

Comments
 (0)