summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Baylis <charles.baylis@linaro.org>2017-03-30 14:17:07 +0100
committerCharles Baylis <charles.baylis@linaro.org>2017-03-30 16:55:53 +0100
commitc7bfd2b5cc5752d2b1a1e01a072b2118adc1bdde (patch)
tree224e10bbacf41d7ba1048230d54ddff051672c9e
parent4fd25353fb7dc60630a34445ab5632a197383a5d (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
-rwxr-xr-xMakeRelease.job31
1 files changed, 24 insertions, 7 deletions
diff --git a/MakeRelease.job b/MakeRelease.job
index 4cc25d2a..7616a6c0 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