Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Jenkinsfile
- Revision:
- 123:6b11bfd9dcae
- Parent:
- 101:1999b1beb68d
--- a/Jenkinsfile Tue Dec 12 14:15:06 2017 +0000
+++ b/Jenkinsfile Wed Dec 20 18:15:08 2017 +0000
@@ -1,17 +1,14 @@
properties ([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [
- [$class: 'StringParameterDefinition', name: 'mbed_os_revision', defaultValue: 'latest', description: 'Revision of mbed-os to build. To access mbed-os PR use format "pull/PR number/head"']
+ [$class: 'StringParameterDefinition', name: 'mbed_os_revision', defaultValue: '', description: 'Revision of mbed-os to build. To access mbed-os PR use format "pull/PR number/head"']
]]])
-try {
- echo "Verifying build with mbed-os version ${mbed_os_revision}"
- env.MBED_OS_REVISION = "${mbed_os_revision}"
- if (mbed_os_revision.matches('pull/\\d+/head')) {
+if (params.mbed_os_revision == '') {
+ echo 'Use mbed OS revision from mbed-os.lib'
+} else {
+ echo "Use mbed OS revisiong ${params.mbed_os_revision}"
+ if (params.mbed_os_revision.matches('pull/\\d+/head')) {
echo "Revision is a Pull Request"
}
-} catch (err) {
- def mbed_os_revision = "latest"
- echo "Verifying build with mbed-os version ${mbed_os_revision}"
- env.MBED_OS_REVISION = "${mbed_os_revision}"
}
// List of targets to compile
@@ -105,13 +102,15 @@
// Set mbed-os to revision received as parameter
execute ("mbed deploy --protocol ssh")
- dir("mbed-os") {
- if (env.MBED_OS_REVISION.matches('pull/\\d+/head')) {
+ if (params.mbed_os_revision != '') {
+ dir("mbed-os") {
+ if (params.mbed_os_revision.matches('pull/\\d+/head')) {
// Use mbed-os PR and switch to branch created
- execute("git fetch origin ${env.MBED_OS_REVISION}:_PR_")
+ execute("git fetch origin ${params.mbed_os_revision}:_PR_")
execute("git checkout _PR_")
} else {
- execute ("git checkout ${env.MBED_OS_REVISION}")
+ execute ("git checkout ${params.mbed_os_revision}")
+ }
}
}
execute ("mbed compile --build out/${target}_${toolchain}_${configName}_${connectiontype}/ -m ${target} -t ${toolchain} -c --app-config ${config_file}")
Wiznet Wi-Fi WizFi310