Skip to content

Instantly share code, notes, and snippets.

View koko-rauch's full-sized avatar

Koko Rauch koko-rauch

View GitHub Profile
stages{
stage("Build") {
steps {
parallel(
"Linux": {
node('linux') {
script {
try {
// build
isSuccess = true // this doesnt work
environment {
isSuccess = false //this is a global variable and can be accessed from any node
}
env overrides: [isSuccess = true]
env overrides: [isSuccess = "true"]
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()
}
def run(String platform, String branch) {
//do stuff
}
return this
def run() {
//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 build(String platform, String branch) {
//do stuff
}
return this
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 = []