2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2016 SUSE.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
14 BIFROST_CONSOLE_LOG="${BUILD_URL}/consoleText"
15 BIFROST_GS_URL=${BIFROST_GS_STORAGE/http:/gs:}
17 echo "Uploading build logs to ${BIFROST_LOG_URL}"
19 echo "Uploading console output"
20 curl -L ${BIFROST_CONSOLE_LOG} | gsutil cp - ${BIFROST_GS_URL}/console.txt
22 [[ ! -d ${WORKSPACE}/logs ]] && exit 0
24 pushd ${WORKSPACE}/logs/ &> /dev/null
26 echo "Compressing and uploading $x"
27 tar -czf - $x | gsutil cp - ${BIFROST_GS_URL}/$x.tar.gz
29 popd ${WORKSPACE}/logs &> /dev/null