From f557bf9a8ba46e112f8b77f037351c1411cb4884 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Tue, 20 Apr 2021 20:46:29 +0200 Subject: [PATCH] test/cases/ostree: test new image types ostree.sh: add case for RHEL 8.5 edge-commit ostree-ng.sh: conditional container and installer type and file names --- test/cases/ostree-ng.sh | 31 +++++++++++++++++++++++++------ test/cases/ostree.sh | 5 +++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/test/cases/ostree-ng.sh b/test/cases/ostree-ng.sh index 87eb66cd1..0741efc7a 100755 --- a/test/cases/ostree-ng.sh +++ b/test/cases/ostree-ng.sh @@ -84,6 +84,25 @@ COMPOSE_INFO=${TEMPDIR}/compose-info-${IMAGE_KEY}.json SSH_OPTIONS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5) SSH_KEY=${OSBUILD_COMPOSER_TEST_DATA}keyring/id_rsa +case "${ID}-${VERSION_ID}" in + "rhel-8.4") + CONTAINER_TYPE=rhel-edge-container + CONTAINER_FILENAME=rhel84-container.tar + INSTALLER_TYPE=rhel-edge-installer + INSTALLER_FILENAME=rhel84-boot.iso + ;; + "rhel-8.5") + CONTAINER_TYPE=edge-container + CONTAINER_FILENAME=container.tar + INSTALLER_TYPE=edge-installer + INSTALLER_FILENAME=installer.iso + ;; + *) + echo "unsupported distro: ${ID}-${VERSION_ID}" + exit 1;; +esac + + # Get the compose log. get_compose_log () { COMPOSE_ID=$1 @@ -272,7 +291,7 @@ sudo composer-cli blueprints push "$BLUEPRINT_FILE" sudo composer-cli blueprints depsolve container # Build container image. -build_image container rhel-edge-container +build_image container "${CONTAINER_TYPE}" # Download the image greenprint "📥 Downloading the container image" @@ -287,7 +306,7 @@ sudo podman rmi -f -a # Deal with stage repo image greenprint "🗜 Pushing image to quay.io" -IMAGE_FILENAME="${COMPOSE_ID}-rhel84-container.tar" +IMAGE_FILENAME="${COMPOSE_ID}-${CONTAINER_FILENAME}" skopeo copy --dest-creds "${QUAY_USERNAME}:${QUAY_PASSWORD}" "oci-archive:${IMAGE_FILENAME}" "${QUAY_REPO_URL}:${QUAY_REPO_TAG}" greenprint "Downloading image from quay.io" sudo podman login quay.io --username "${QUAY_USERNAME}" --password "${QUAY_PASSWORD}" @@ -337,12 +356,12 @@ sudo composer-cli blueprints depsolve installer # Build installer image. # Test --url arg following by URL with tailling slash for bz#1942029 -build_image installer rhel-edge-installer "${PROD_REPO_URL}/" +build_image installer "${INSTALLER_TYPE}" "${PROD_REPO_URL}/" # Download the image greenprint "📥 Downloading the installer image" sudo composer-cli compose image "${COMPOSE_ID}" > /dev/null -ISO_FILENAME="${COMPOSE_ID}-rhel84-boot.iso" +ISO_FILENAME="${COMPOSE_ID}-${INSTALLER_FILENAME}" sudo mv "${ISO_FILENAME}" /var/lib/libvirt/images # Clean compose and blueprints. @@ -544,7 +563,7 @@ sudo composer-cli blueprints push "$BLUEPRINT_FILE" sudo composer-cli blueprints depsolve upgrade # Build upgrade image. -build_image upgrade rhel-edge-container "$PROD_REPO_URL" +build_image upgrade "${CONTAINER_TYPE}" "$PROD_REPO_URL" # Download the image greenprint "📥 Downloading the upgrade image" @@ -559,7 +578,7 @@ sudo podman rmi -f -a # Deal with stage repo container greenprint "🗜 Extracting image" -IMAGE_FILENAME="${COMPOSE_ID}-rhel84-container.tar" +IMAGE_FILENAME="${COMPOSE_ID}-${CONTAINER_FILENAME}" sudo podman pull "oci-archive:${IMAGE_FILENAME}" sudo podman images # Clear image file diff --git a/test/cases/ostree.sh b/test/cases/ostree.sh index dd1f17ce9..e3b377e04 100755 --- a/test/cases/ostree.sh +++ b/test/cases/ostree.sh @@ -33,6 +33,11 @@ case "${ID}-${VERSION_ID}" in OSTREE_REF="rhel/8/${ARCH}/edge" OS_VARIANT="rhel8-unknown" BOOT_LOCATION="$COMPOSE_URL/compose/BaseOS/x86_64/os/";; + "rhel-8.5") + IMAGE_TYPE=edge-commit + OSTREE_REF="rhel/8/${ARCH}/edge" + OS_VARIANT="rhel8-unknown" + BOOT_LOCATION="$COMPOSE_URL/compose/BaseOS/x86_64/os/";; *) echo "unsupported distro: ${ID}-${VERSION_ID}" exit 1;;