66 lines
2.3 KiB
Diff
66 lines
2.3 KiB
Diff
diff --git i/tmt/tests/bootc-install-provision.sh w/tmt/tests/bootc-install-provision.sh
|
|
index c4c884b..29df30c 100755
|
|
--- i/tmt/tests/bootc-install-provision.sh
|
|
+++ w/tmt/tests/bootc-install-provision.sh
|
|
@@ -4,6 +4,8 @@ set -exuo pipefail
|
|
BOOTC_TEMPDIR=$(mktemp -d)
|
|
trap 'rm -rf -- "$BOOTC_TEMPDIR"' EXIT
|
|
|
|
+ARCH=$(uname -m)
|
|
+
|
|
# LBI only enabled for test-22-logically-bound-install
|
|
LBI="${LBI:-disabled}"
|
|
|
|
@@ -16,6 +18,28 @@ case "$ID" in
|
|
"fedora")
|
|
TIER1_IMAGE_URL="${TIER1_IMAGE_URL:-quay.io/fedora/fedora-bootc:${VERSION_ID}}"
|
|
;;
|
|
+ "rhel")
|
|
+ TIER1_IMAGE_URL="${TIER1_IMAGE_URL:-images.paas.redhat.com/bootc/rhel-bootc:latest-${VERSION_ID}}"
|
|
+
|
|
+ CURRENT_COMPOSE_ID=$(skopeo inspect --no-tags --retry-times=5 --tls-verify=false "docker://${TIER1_IMAGE_URL}" | jq -r '.Labels."redhat.compose-id"')
|
|
+
|
|
+ if [[ -n ${CURRENT_COMPOSE_ID} ]]; then
|
|
+ if [[ ${CURRENT_COMPOSE_ID} == *-updates-* ]]; then
|
|
+ BATCH_COMPOSE="updates/"
|
|
+ else
|
|
+ BATCH_COMPOSE=""
|
|
+ fi
|
|
+ else
|
|
+ BATCH_COMPOSE="updates/"
|
|
+ CURRENT_COMPOSE_ID=latest-RHEL-$VERSION_ID
|
|
+ fi
|
|
+
|
|
+ # use latest compose if specific compose is not accessible
|
|
+ RC=$(curl -skIw '%{http_code}' -o /dev/null "http://download.eng.bos.redhat.com/rhel-${VERSION_ID%%.*}/nightly/${BATCH_COMPOSE}RHEL-${VERSION_ID%%.*}/${CURRENT_COMPOSE_ID}/STATUS")
|
|
+ if [[ $RC != "200" ]]; then
|
|
+ CURRENT_COMPOSE_ID=latest-RHEL-${VERSION_ID%%}
|
|
+ fi
|
|
+ ;;
|
|
esac
|
|
|
|
if [ "$TMT_REBOOT_COUNT" -eq 0 ]; then
|
|
@@ -93,6 +117,22 @@ COMMONEOF
|
|
tee "$FEDORA_CI_CONTAINERFILE" > /dev/null << FEDORACIEOF
|
|
FROM $TIER1_IMAGE_URL
|
|
|
|
+RUN <<REPORUN
|
|
+tee "/etc/yum.repos.d/rhel.repo" >/dev/null <<RHELREPOEOF
|
|
+[rhel-baseos]
|
|
+name=baseos
|
|
+baseurl=http://download.eng.bos.redhat.com/rhel-${VERSION_ID%%.*}/nightly/${BATCH_COMPOSE}RHEL-${VERSION_ID%%.*}/${CURRENT_COMPOSE_ID}/compose/BaseOS/${ARCH}/os/
|
|
+enabled=1
|
|
+gpgcheck=0
|
|
+
|
|
+[rhel-appstream]
|
|
+name=appstream
|
|
+baseurl=http://download.eng.bos.redhat.com/rhel-${VERSION_ID%%.*}/nightly/${BATCH_COMPOSE}RHEL-${VERSION_ID%%.*}/${CURRENT_COMPOSE_ID}/compose/AppStream/${ARCH}/os/
|
|
+enabled=1
|
|
+gpgcheck=0
|
|
+RHELREPOEOF
|
|
+REPORUN
|
|
+
|
|
RUN dnf -y upgrade /rpms/*.rpm
|
|
FEDORACIEOF
|
|
cat >"$CONTAINERFILE" <<REALEOF
|