Fixes apex baremetal RPM install path for multiple scenarios 91/5691/1
authorTim Rozet <trozet@redhat.com>
Wed, 6 Jan 2016 22:24:12 +0000 (17:24 -0500)
committerTim Rozet <trozet@redhat.com>
Wed, 6 Jan 2016 22:24:12 +0000 (17:24 -0500)
Change-Id: Icc7a0d7daed4db94c7717283c7a1d44a0939a280
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex.yml

index c2f4544..b41cedb 100644 (file)
 
             source opnfv.properties
             RPM_INSTALL_PATH=build_output/$(basename $OPNFV_RPM_URL)
+            if [ ! -e "$RPM_INSTALL_PATH" ]; then
+               RPM_INSTALL_PATH=http://${OPNFV_RPM_URL}
+            fi
 
             # update / install the new rpm
             if rpm -q opnfv-apex > /dev/null; then
                if sudo yum update -y $RPM_INSTALL_PATH | grep "does not update installed package"; then
                    sudo yum downgrade -y $RPM_INSTALL_PATH;
                fi
-            elif [ -e "$RPM_INSTALL_PATH" ]; then
-               sudo yum install -y $RPM_INSTALL_PATH;
             else
-               sudo yum install -y http://${OPNFV_RPM_URL}
+               sudo yum install -y $RPM_INSTALL_PATH;
             fi
 
             # cleanup environment before we start