Improve the release job script 32/16432/1
authorAnil Belur <abelur@linuxfoundation.org>
Sun, 4 Aug 2019 22:55:50 +0000 (08:55 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Sun, 4 Aug 2019 22:55:50 +0000 (08:55 +1000)
Change-Id: Ie62e2f3771632012423e0b791aca1551b4b31112
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
releasenotes/notes/fix-release-job-script-0179491d09b06e66.yaml [new file with mode: 0644]
shell/release-job.sh

diff --git a/releasenotes/notes/fix-release-job-script-0179491d09b06e66.yaml b/releasenotes/notes/fix-release-job-script-0179491d09b06e66.yaml
new file mode 100644 (file)
index 0000000..c78c6e0
--- /dev/null
@@ -0,0 +1,5 @@
+---
+fixes:
+  - |
+    Fix the release job script to handle any trailing '/' set on log_dir
+    and also handle unbound variables correctly.
index a0e6b44..d9880cd 100644 (file)
@@ -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