From 9f4740ae2e124e1e061c2cda663113548e3fef48 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Tue, 15 Jan 2019 10:23:42 +0100 Subject: [PATCH] Add option none to disable ci tests --- Jenkinsfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 42046e5c40..d1a1557ee4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,6 +5,7 @@ def loginBash = '#!/bin/bash -l' def bashScript = 'ci-scripts/ci-runner.bash' def machinesList = ['daint', 'dom', 'kesch'] def machinesToRun = machinesList +def runTests = true def uniqueID stage('Initialization') { @@ -37,6 +38,11 @@ stage('Initialization') { currentBuild.result = 'SUCCESS' return } + else if (splittedComment[2] == 'none') { + runTests = false + currentBuild.result = 'SUCCESS' + return + } machinesRequested = [] for (i = 2; i < splittedComment.size(); i++) { @@ -66,6 +72,11 @@ stage('Initialization') { } } +if (!runTests) { + println "Won't execute any test (${currentBuild.result}). Exiting..." + return +} + if (currentBuild.result != 'SUCCESS') { println "Initialization failed (${currentBuild.result}). Exiting..." return