This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stages{ | |
| stage("Build") { | |
| steps { | |
| parallel( | |
| "Linux": { | |
| node('linux') { | |
| script { | |
| try { | |
| // build | |
| isSuccess = true // this doesnt work |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| environment { | |
| isSuccess = false //this is a global variable and can be accessed from any node | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env overrides: [isSuccess = true] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env overrides: [isSuccess = "true"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def run(String platform, String branch) { | |
| //do stuff | |
| } | |
| return this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def run() { | |
| //do stuff | |
| } | |
| return this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def build(String platform, String branch) { | |
| //do stuff | |
| } | |
| return this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 = [] | |
OlderNewer