diff --git a/Jenkinsfile b/Jenkinsfile index 705b457746..9bfdda570a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,6 +9,7 @@ def morpheusTargets = [ // Map morpheus toolchains to compiler labels on Jenkins def toolchains = [ //ARM: "armcc", + //IAR: "iar_arm", GCC_ARM: "arm-none-eabi-gcc" ] @@ -27,17 +28,22 @@ for (int i = 0; i < morpheusTargets.size(); i++) { } } -/* Jenkins does not allow stages inside parallel execution, - * https://issues.jenkins-ci.org/browse/JENKINS-26107 will solve this by adding labeled blocks - */ -stage "parallel build" try { + /* Jenkins does not allow stages inside parallel execution, + * https://issues.jenkins-ci.org/browse/JENKINS-26107 will solve this by adding labeled blocks + */ + stage "parallel build" // Actually run the steps in parallel - parallel takes a map as an argument, hence the above. parallel stepsForParallel - + + stage "build testapps" + parallel testapp: { + build 'ARMmbed/mbed-client-testapp/master' + }, cliapp: { + build 'ARMmbed/mbed-client-cliapp/master' + }, failFast: true } catch (err) { currentBuild.result = 'FAILURE' - } //Create yotta build steps for parallel execution @@ -47,8 +53,14 @@ try { deleteDir() dir("mbed-os") { checkout scm - sh "mbed deploy --protocol ssh" - sh "mbed compile --tests -m ${target} -t ${toolchain} -c" + // shell script on Unix, batch on Windows + if (isUnix()) { + sh "mbed deploy --protocol ssh" + sh "mbed compile --tests -m ${target} -t ${toolchain} -c" + } else { + bat "mbed deploy --protocol ssh" + bat "mbed compile --tests -m ${target} -t ${toolchain} -c" + } } } }