diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/apex/apex.yml | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index e6d196a38..57825cecd 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -473,16 +473,27 @@ 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 + + RPM_LIST=$RPM_INSTALL_PATH + for pkg in common undercloud; do + RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}" + done # 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_INSTALL_PATH | grep "does not update installed package"; then - sudo yum downgrade -y $RPM_INSTALL_PATH; + elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then + if ! sudo yum downgrade -y $RPM_LIST; then + yum remove -y opnfv-undercloud opnfv-common + sudo yum downgrade -y $RPM_INSTALL_PATH + fi fi else - sudo yum install -y $RPM_INSTALL_PATH; + sudo yum install -y $RPM_LIST; fi # cleanup virtual machines before we start @@ -538,15 +549,23 @@ RPM_INSTALL_PATH=http://${OPNFV_RPM_URL} fi + RPM_LIST=$RPM_INSTALL_PATH + for pkg in common undercloud; do + RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}" + done + # 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_INSTALL_PATH | grep "does not update installed package"; then - sudo yum downgrade -y $RPM_INSTALL_PATH; + elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then + if ! sudo yum downgrade -y $RPM_LIST; then + yum remove -y opnfv-undercloud opnfv-common + sudo yum downgrade -y $RPM_INSTALL_PATH + fi fi else - sudo yum install -y $RPM_INSTALL_PATH; + sudo yum install -y $RPM_LIST; fi # cleanup environment before we start |