Fixes RPM install for baremetal 87/5687/1
authorTim Rozet <trozet@redhat.com>
Wed, 6 Jan 2016 21:51:25 +0000 (16:51 -0500)
committerTim Rozet <trozet@redhat.com>
Wed, 6 Jan 2016 21:51:25 +0000 (16:51 -0500)
Currently the deploy builders assume that the RPM is already on the
machine under build_output directory.  This is true if the job was build
 or verify job.  But just with deploy, it is missing.  This patch allows
yum install from artifacts page directly.

Change-Id: I243a747c818a5b6dcf911fa99ee063766417cfcb
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex.yml

index 97a7013..c2f4544 100644 (file)
                if sudo yum update -y $RPM_INSTALL_PATH | grep "does not update installed package"; then
                    sudo yum downgrade -y $RPM_INSTALL_PATH;
                fi
-            else
+            elif [ -e "$RPM_INSTALL_PATH" ]; then
                sudo yum install -y $RPM_INSTALL_PATH;
+            else
+               sudo yum install -y http://${OPNFV_RPM_URL}
             fi
 
             # cleanup environment before we start