Add test application builds to Jenkinsfile (#266)

Added test application job calls as postbuild step. 
Added support for IAR toolchain but not enabling this yet.
Changed environmet check from compiler label to isUnix call.
Mika Karjalainen 2016-06-13 10:57:52 +03:00 committed by GitHub
parent 219f6e2554
commit cd5c9564fd
1 changed files with 20 additions and 8 deletions

28
Jenkinsfile vendored
View File

@ -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"
}
}
}
}