jjb: infra: bifrost-verify.sh: Rework code for uploading the build log 83/27283/1
authorMarkos Chandras <mchandras@suse.de>
Fri, 20 Jan 2017 09:50:27 +0000 (09:50 +0000)
committerMarkos Chandras <mchandras@suse.de>
Fri, 20 Jan 2017 09:50:27 +0000 (09:50 +0000)
gsutil does not support compression on streaming uploads so rework the
code to save the log into a temporary file first. Fixes the following
error:

CommandException: gzip compression is not currently supported on
streaming uploads. Remove the compression flag or save the streamed
output temporarily to a file before uploading.

Change-Id: I3976bf3271be3aff8bc7b656ac49de6986ca6c36
Signed-off-by: Markos Chandras <mchandras@suse.de>
jjb/infra/bifrost-verify.sh

index 2cb41a4..201d3f2 100755 (executable)
@@ -20,7 +20,9 @@ function upload_logs() {
     echo "Uploading build logs to ${BIFROST_LOG_URL}"
 
     echo "Uploading console output"
-    curl -s -L ${BIFROST_CONSOLE_LOG} | gsutil -q cp -Z - ${BIFROST_GS_URL}/build_log.txt
+    curl -s -L ${BIFROST_CONSOLE_LOG} > build_log.txt
+    gsutil -q cp -Z build_log.txt ${BIFROST_GS_URL}/build_log.txt
+    rm build_log.txt
 
     [[ ! -d ${WORKSPACE}/logs ]] && exit 0