From: Tim Rozet Date: Thu, 24 May 2018 18:17:00 +0000 (-0400) Subject: Apex: fix unbound variable in artifact dl X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=cde4c43d8694ae2182c0200bac6f3e3fd535bec6;hp=10ed113d9e0581a9e9b5afddd1a3b924e6b81e2d;p=releng.git Apex: fix unbound variable in artifact dl We still need VERSION_EXTENSION var to figure out which RPM files to remove on the slave. Change-Id: I03cc9c3318edec9860c8f3ffc01db52517a644b4 Signed-off-by: Tim Rozet --- diff --git a/jjb/apex/apex-download-artifact.sh b/jjb/apex/apex-download-artifact.sh index 3efe1cbc7..e1e51b3b6 100755 --- a/jjb/apex/apex-download-artifact.sh +++ b/jjb/apex/apex-download-artifact.sh @@ -45,10 +45,9 @@ else RPM_INSTALL_PATH=$(echo "http://"$OPNFV_RPM_URL | sed 's/\/'"$(basename $OPNFV_RPM_URL)"'//') RPM_LIST=$(basename $OPNFV_RPM_URL) - + # find version of RPM + VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-([0-9]{8}|[a-z]+-[0-9]\.[0-9]+)') if [ "$BRANCH" != 'master' ]; then - # find version of RPM - VERSION_EXTENSION=$(echo $(basename $RPM_LIST) | grep -Eo '[0-9]+\.[0-9]+-([0-9]{8}|[a-z]+-[0-9]\.[0-9]+)') # build RPM List which already includes base Apex RPM RPM_LIST+=" opnfv-apex-undercloud-${VERSION_EXTENSION}.noarch.rpm" RPM_LIST+=" python34-opnfv-apex-${VERSION_EXTENSION}.noarch.rpm"