summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-05-10 13:22:09 -0400
committerTim Rozet <trozet@redhat.com>2016-05-10 13:24:35 -0400
commitfcce9a3f0447929302534edbc05a3d77b1492472 (patch)
tree5d30e3f331825c4b2b20363f59897edf3f650cf0 /jjb
parent7ef7632b7b38484f7dd17713760030e9d36bbcef (diff)
Apex: More fixes to daily master
Change-Id: I0504e88c89ae75068c468f4d95db02ff65f11829 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/apex/apex.yml27
1 files changed, 20 insertions, 7 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index f02bd283e..35a6bf730 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -940,20 +940,33 @@
# update / install the new rpm
if rpm -q opnfv-apex > /dev/null; then
- if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then
- echo "RPM is already installed"
- elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then
- if ! sudo yum downgrade -y $RPM_LIST; then
- sudo yum remove -y opnfv-undercloud opnfv-common
- sudo yum downgrade -y $RPM_INSTALL_PATH
+ INSTALLED_RPMS=$(rpm -qa | grep apex)
+ for x in $INSTALLED_RPMS; do
+ INSTALLED_RPM_VER=$(echo $x | sed 's/opnfv-apex-//').rpm
+ # Does each RPM's version match the version required for deployment
+ if [ "$INSTALLED_RPM_VER" == "$VERSION_EXTENSION" ]; then
+ echo "RPM $x is already installed"
+ else
+ echo "RPM $x does not match $VERSION_EXTENSION"
+ echo "Will upgrade/downgrade RPMs..."
+ # Try to upgrade/downgrade RPMS
+ if sudo yum update -y $RPM_LIST | grep "does not update installed package"; then
+ if ! sudo yum downgrade -y $RPM_LIST; then
+ sudo yum remove -y opnfv-apex-undercloud opnfv-apex-common opnfv-apex-opendaylight-sfc opnfv-apex-onos
+ sudo yum downgrade -y $RPM_INSTALL_PATH
+ fi
fi
- fi
+ break
+ fi
+ done
else
sudo yum install -y $RPM_LIST;
fi
DEPLOY_CMD=opnfv-deploy
DEPLOY_FILE="/etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
NETWORK_FILE="/etc/opnfv-apex/network_settings.yaml"
+ export RESOURCES="/var/opt/opnfv/images"
+ export CONFIG="/var/opt/opnfv"
fi
if [ "$OPNFV_CLEAN" == 'yes' ]; then