summaryrefslogtreecommitdiffstats
path: root/jjb/apex
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2016-01-12 11:10:44 -0500
committerDan Radez <dradez@redhat.com>2016-01-14 23:02:15 -0500
commit26b86cf943aa7849e9162d36890e620d4179837a (patch)
tree64f4e107d4682560f4f1f16de73087b5fc64ad5f /jjb/apex
parent31f5b9514420267a75de1ea331ce0c4efe4a919c (diff)
teaching Apex builder to install multiple RPMs
Change-Id: I10f462497de58319048e8a0feb6ed29257d64453 Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'jjb/apex')
-rw-r--r--jjb/apex/apex.yml31
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