- 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
-
- [[ ! -d ${WORKSPACE}/logs ]] && exit 0
-
- pushd ${WORKSPACE}/logs/ &> /dev/null
- for x in *.log; do
- echo "Compressing and uploading $x"
- gsutil -q cp -Z ${x} ${BIFROST_GS_URL}/${x}
- done
+ # Make sure the old landing page is gone in case
+ # we break later on. We don't want to publish
+ # stale information.
+ # TODO: Maybe cleanup the entire $BIFROST_GS_URL directory
+ # before we upload the new data.
+ gsutil -q rm ${BIFROST_GS_URL}/index.html || true
+
+ echo "Uploading collected bifrost build logs to ${BIFROST_LOG_URL}"
+
+ if [[ -d ${WORKSPACE}/logs ]]; then
+ pushd ${WORKSPACE}/logs &> /dev/null
+ for x in *.log; do
+ echo "Compressing and uploading $x"
+ gsutil -q cp -Z ${x} ${BIFROST_GS_URL}/${x}
+ done
+ popd &> /dev/null
+ fi