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>
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