From: Anil Belur Date: Sun, 4 Aug 2019 22:55:50 +0000 (+1000) Subject: Improve the release job script X-Git-Tag: v0.40.3~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;ds=inline;h=22b444050047fcc1292edb33950a1749d0ab007b;hp=-c;p=releng%2Fglobal-jjb.git Improve the release job script Change-Id: Ie62e2f3771632012423e0b791aca1551b4b31112 Signed-off-by: Anil Belur --- 22b444050047fcc1292edb33950a1749d0ab007b diff --git a/releasenotes/notes/fix-release-job-script-0179491d09b06e66.yaml b/releasenotes/notes/fix-release-job-script-0179491d09b06e66.yaml new file mode 100644 index 00000000..c78c6e09 --- /dev/null +++ b/releasenotes/notes/fix-release-job-script-0179491d09b06e66.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fix the release job script to handle any trailing '/' set on log_dir + and also handle unbound variables correctly. diff --git a/shell/release-job.sh b/shell/release-job.sh index a0e6b448..d9880cd3 100644 --- a/shell/release-job.sh +++ b/shell/release-job.sh @@ -34,6 +34,7 @@ if [ "${LOGS_SERVER}" == 'None' ]; then exit 1 fi +NEXUSPROXY="${NEXUSPROXY:-None}" NEXUS_URL="${NEXUSPROXY:-$NEXUS_URL}" # Fetch the release-schema.yaml @@ -61,7 +62,8 @@ NEXUS_PATH="${SILO}/${JENKINS_HOSTNAME}/" LOGS_URL="${LOGS_SERVER}/${NEXUS_PATH}${LOG_DIR}" PATCH_DIR="$(mktemp -d)" -wget --quiet -P "$PATCH_DIR" "${LOGS_URL}"staging-repo.txt.gz +LOGS_URL=${LOGS_URL%/} # strip any trailing '/' +wget -P "$PATCH_DIR" "${LOGS_URL}/"staging-repo.txt.gz nexus_release(){ for staging_url in $(zcat "$PATCH_DIR"/staging-repo.txt.gz | awk -e '{print $2}'); do