diff options
author | Charles Baylis <charles.baylis@linaro.org> | 2017-03-30 14:17:07 +0100 |
---|---|---|
committer | Charles Baylis <charles.baylis@linaro.org> | 2017-04-04 14:56:29 +0000 |
commit | 6f50c07f58f375cd3797cbc6175f2130f5b1598e (patch) | |
tree | f7a59af694bedf0504f8279641a1aecb5a487a15 /MakeRelease.job | |
parent | 6c405d1d78743cae5a3050ca9e2b020721675f47 (diff) |
MakeRelease.job: use abe --list-artifacts option
Remove uses of find to locate manifest by using
--list-artifacts to record real location of the
manifest.
Change-Id: I5683f5decd034d21dd1ab2ecd22e48aed09cd079
Diffstat (limited to 'MakeRelease.job')
-rwxr-xr-x | MakeRelease.job | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/MakeRelease.job b/MakeRelease.job index 018ad105..a71ebb5a 100755 --- a/MakeRelease.job +++ b/MakeRelease.job @@ -26,6 +26,13 @@ usage() { exit $ret } +read_var() +{ + local artifact_list=$1 + local var=$2 + grep "^${var}=" "${artifact_list}" | cut -d = -f 2- +} + # Jenkins may run only using environment variables, a user needs to always # supply some command line arguments. if test $# -eq 0 -a x"${JENKINS_SERVER_COOKIE}" = x; then @@ -155,11 +162,14 @@ logfile=${user_workspace}/MakeRelease-${buildnumber}-$(uname -m).log # Remove logfile if present (for some unknown reason) rm -f ${logfile} abe_ret=0 +manifests=() +tarballs=() # Canadian cross builds require a Linux hosted cross compiler first if test x"${canadian}" = x"true"; then - $CONFIG_SHELL ${abe_dir}/abe.sh ${update} --release ${release} ${srcs} ${platform} --build all ${libc} ${extra} --tarbin >> ${logfile} + $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts artifacts1.txt ${update} --release ${release} ${srcs} ${platform} --build all ${libc} ${extra} --tarbin >> ${logfile} abe_ret=$? host="--host i686-w64-mingw32" + manifests+=($(read_var artifacts1.txt manifest)) else host="" fi @@ -169,8 +179,19 @@ fi # build the mingw32 compiler only if the previous cross-compiler build was # successful. if test ${abe_ret} -eq 0; then - $CONFIG_SHELL ${abe_dir}/abe.sh ${update} --release ${release} --tarbin ${srcs} ${platform} ${host} --build all ${libc} ${extra} >> ${logfile} + $CONFIG_SHELL ${abe_dir}/abe.sh --list-artifacts artifacts2.txt ${update} --release ${release} --tarbin ${srcs} ${platform} ${host} --build all ${libc} ${extra} >> ${logfile} abe_ret=$? + manifests+=($(read_var artifacts2.txt manifest)) +fi + + +if test x"${canadian}" = x"true"; then + # take the toolchain, sysroot and runtime tarballs from the linux build + tarballs+=($(read_var artifacts1.txt '\(toolchain\|sysroot\|runtime\)\(_asc\)\?' )) + # and just the toolchain from the mingw build + tarballs+=($(read_var artifacts2.txt 'toolchain\(_asc\)\?' )) +else + tarballs+=($(read_var artifacts2.txt '\(toolchain\|sysroot\|runtime\)\(_asc\)\?' )) fi # MakeRelease.job doesn't require an input gcc_src parameter (it'll invoke ABE @@ -180,9 +201,6 @@ fi # gcc-linaro-6.1.1-2016.08-rc1-win32-manifest.txt manifest_match="*-manifest.txt" -# Read the found manifests into an array. -read -a manifests <<<`find ${user_workspace} -name "${manifest_match}"` - # Make sure we have at least one manifest file found. if test -z "${manifests[0]}"; then echo "Couldn't find a manifest file for the recent build." @@ -255,8 +273,7 @@ do scp ${manifest} ${fileserver}:${binaries}/ done -tarballs="`find ${user_snapshots} -name \*${release}\*.xz -o -name \*${release}\*.asc`" -scp ${tarballs} ${fileserver}:${binaries}/ +scp "${tarballs[@]}" ${fileserver}:${binaries}/ echo "Starting manifest validation." git clone --depth 1 git://git.linaro.org/toolchain/abe-tests.git |