diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2018-05-25 14:33:12 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2018-06-07 06:59:46 +0000 |
commit | 7d61605a2d8538f4ad72ef8b7c6bc25cc8063c40 (patch) | |
tree | f2699e386c2885f8fe30899606b8f8e5cddbacd7 /tcwg-make-release.yaml | |
parent | 75e2ea4a508391389e7346f79435113674403311 (diff) |
tcwg*release*: Add dryrun boolean parameter.
If true, the jobs do not perform cpu/time consuming tasks, they just
pretend to run.
Useful for debugging.
Change-Id: I055e7cc9e233d940d00dfa4f001be4f89dd80d2c
Diffstat (limited to 'tcwg-make-release.yaml')
-rw-r--r-- | tcwg-make-release.yaml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tcwg-make-release.yaml b/tcwg-make-release.yaml index f230db27..aabb4b52 100644 --- a/tcwg-make-release.yaml +++ b/tcwg-make-release.yaml @@ -78,6 +78,10 @@ name: logsdir default: '' description: 'Optional upload dir for logs on fileserver. If empty, a suitable value is computed by the script' + - bool: + name: dryrun + default: false + description: 'Dry-run, do nothing, just print steps' disabled: false node: tcwg-coordinator retry-count: 3 @@ -268,6 +272,34 @@ ;; esac + if $dryrun; then + echo DRYRUN: ${BUILD_CONTAINER} "cd ${WORKSPACE} && ${shell} ${WORKSPACE}/jenkins-scripts/MakeRelease.job --abedir ${WORKSPACE}/abe --workspace ${WORKSPACE} ${canadian} --target ${target}${tcwg_release:+ --release_name ${tcwg_release}} --fileserver ${fileserver} --toolchainconfig ${toolchain_config} --binariesdir ${binariesdir}/${target} --logsdir ${logsdir}/${target} --buildnumber ${BUILD_NUMBER} ${gcc_src:+ --gcc ${gcc_src}} ${binutils_src:+ --binutils ${binutils_src}} ${glibc_src:+ --glibc ${glibc_src}}" + + # Dry-run: generate fake test jobs + if $testrelease; then + tarball_linux="tarball_linux" + tarball_linux_url="http://${fileserver}/${url_prefix}/${target}/${tarball_linux}" + cat << EOF > tcwg.params.linux + tarball_url=${tarball_linux_url} + release=${tcwg_version}-${tcwg_release} + target=${host}-${target} + dryrun=$dryrun + EOF + + if test x"${canadian}" = x"--canadian"; then + tarball_mingw="tarball_mingw" + tarball_mingw_url="http://${fileserver}/${url_prefix}/${target}/${tarball_mingw}" + cat << EOF > tcwg.params.mingw + tarball_url=${tarball_mingw_url} + release=${tcwg_version}-${tcwg_release} + target=mingw-${target} + dryrun=$dryrun + EOF + fi + fi + exit 0 + fi + ${BUILD_CONTAINER} "cd ${WORKSPACE} && ${shell} ${WORKSPACE}/jenkins-scripts/MakeRelease.job --abedir ${WORKSPACE}/abe --workspace ${WORKSPACE} ${canadian} --target ${target}${tcwg_release:+ --release_name ${tcwg_release}} --fileserver ${fileserver} --toolchainconfig ${toolchain_config} --binariesdir ${binariesdir}/${target} --logsdir ${logsdir}/${target} --buildnumber ${BUILD_NUMBER} ${gcc_src:+ --gcc ${gcc_src}} ${binutils_src:+ --binutils ${binutils_src}} ${glibc_src:+ --glibc ${glibc_src}}" if test $? -gt 0; then exit 1 |