X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Flogs-deploy.sh;h=aee1b813d1f511fa5282d28917429b814e008c23;hb=107653e3984456a58888a62a321253b77124e836;hp=114692e96d8d2c2d5abc521f13f5bd7b9a2d53f0;hpb=b3c4fefa00bb18fe2d8ae6f4ba3e2bf0abd154c5;p=releng%2Fglobal-jjb.git
diff --git a/shell/logs-deploy.sh b/shell/logs-deploy.sh
index 114692e9..aee1b813 100644
--- a/shell/logs-deploy.sh
+++ b/shell/logs-deploy.sh
@@ -13,25 +13,15 @@ echo "---> logs-deploy.sh"
# Ensure we fail the job if any steps fail.
set -eu -o pipefail
-set -x # Trace commands for this script to make debugging easier.
-
-ARCHIVE_ARTIFACTS="${ARCHIVE_ARTIFACTS:-}"
-LOGS_SERVER="${LOGS_SERVER:-None}"
-
-if [ "${LOGS_SERVER}" == 'None' ]
-then
- set +x # Disable trace since we no longer need it
-
+if [[ -z $"${LOGS_SERVER:-}" ]]; then
echo "WARNING: Logging server not set"
else
- NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}"
- NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
- BUILD_URL="${BUILD_URL}"
-
- lftools deploy archives -p "$ARCHIVE_ARTIFACTS" "$NEXUS_URL" "$NEXUS_PATH" "$WORKSPACE"
- lftools deploy logs "$NEXUS_URL" "$NEXUS_PATH" "$BUILD_URL"
+ nexus_url="${NEXUSPROXY:-$NEXUS_URL}"
+ nexus_path="${SILO}/${JENKINS_HOSTNAME}/${JOB_NAME}/${BUILD_NUMBER}"
- set +x # Disable trace since we no longer need it.
+ lftools deploy archives -p "${ARCHIVE_ARTIFACTS:-}" "$nexus_url" \
+ "$nexus_path" "$WORKSPACE"
+ lftools deploy logs "$nexus_url" "$nexus_path" "${BUILD_URL:-}"
- echo "Build logs: $LOGS_SERVER/$NEXUS_PATH"
+ echo "Build logs: $LOGS_SERVER/$nexus_path"
fi