tests: Keep beakerlib repo on the VM for tests which need it

Related: rhbz#1770193
This commit is contained in:
Alexander Todorov 2019-11-06 15:12:13 +02:00 committed by Brian C. Lane
parent b0dc59534c
commit 64a593a376

View File

@ -17,16 +17,13 @@ fi
if ! rpm -q beakerlib; then if ! rpm -q beakerlib; then
if [ $(. /etc/os-release && echo $ID) = "rhel" ]; then if [ $(. /etc/os-release && echo $ID) = "rhel" ]; then
(cd /etc/yum.repos.d; curl -O -L http://download.devel.redhat.com/beakerrepos/beaker-client-RedHatEnterpriseLinux.repo) (cd /etc/yum.repos.d; curl -O -L http://download.devel.redhat.com/beakerrepos/beaker-client-RedHatEnterpriseLinux.repo)
# disable sslverify b/c yum will fail to sync metadata otherwise
# The beaker repository doesn't include repos for minor releases sed -i "s/\(gpgcheck=0\)/\1\nsslverify=0/" /etc/yum.repos.d/beaker-client-RedHatEnterpriseLinux.repo
VERSION=$(. /etc/os-release && echo ${VERSION_ID%.*}) # do not remove the repo file. We now have tests which use beakerlib
yum install -y --releasever=$VERSION --setopt=sslverify=0 beakerlib # inside their blueprints so this needs to stay on the VM
# prevent yum from trying to sync the cache again later (it fails without sslverify=0)
rm /etc/yum.repos.d/beaker-client-RedHatEnterpriseLinux.repo
else
yum install -y beakerlib
fi fi
yum install -y beakerlib
fi fi
EPEL_REPO="/etc/yum.repos.d/epel7.repo" EPEL_REPO="/etc/yum.repos.d/epel7.repo"