Skip to content

Instantly share code, notes, and snippets.

View koko-rauch's full-sized avatar

Koko Rauch koko-rauch

View GitHub Profile
def prepareTests(){
def myMap = [ 'test1' : params.runTest1, 'test2' : params.runTest2 ]
def testsToRun = []
for (test in myMap) {
if (test.value) {
testsToRun.add(test.key)
}
}
def runTestScript() {
String[] testsToRun = prepareTests()
def testScript = load "jenkins/test.groovy"
testScript.run(testsToRun)
}
def prepareTests(){
def myMap = [ 'test1' : params.runTest1, 'test2' : params.runTest2 ]
def testsToRun = []
def build(String platform, String branch) {
//do stuff
}
return this
def runBuildScript(String platform) {
def buildScript = load "jenkins/build.groovy"
buildScript.build(platform, env.BRANCH_NAME)
}
def runTestScript() {
def testScript = load "jenkins/test.groovy"
testScript.run()
}
def run() {
//do stuff
}
return this
def run(String platform, String branch) {
//do stuff
}
return this
def runBuildScript(String platform) {
def buildScript = load "jenkins/build.groovy"
buildScript.run(platform, env.BRANCH_NAME)
}
def runTestScript() {
def testScript = load "jenkins/test.groovy"
testScript.run()
}
env overrides: [isSuccess = "true"]
env overrides: [isSuccess = true]
environment {
isSuccess = false //this is a global variable and can be accessed from any node
}