test: Update tests to support embeded container image feature
Container image can only be embeded on commit Use fedora image instead of ubi8 and only run embeded image checking on RHEL 8.7, 9.1, CS8 and CS9.
This commit is contained in:
parent
89c2bb0d3e
commit
c71ae8f455
4 changed files with 82 additions and 6 deletions
|
|
@ -113,6 +113,7 @@ case "${ID}-${VERSION_ID}" in
|
|||
OSTREE_REF="fedora/35/${ARCH}/iot"
|
||||
OSTREE_OSNAME=fedora
|
||||
OS_VARIANT="fedora35"
|
||||
EMBEDED_CONTAINER="false"
|
||||
;;
|
||||
"fedora-36")
|
||||
CONTAINER_TYPE=fedora-iot-container
|
||||
|
|
@ -120,22 +121,27 @@ case "${ID}-${VERSION_ID}" in
|
|||
OSTREE_REF="fedora/36/${ARCH}/iot"
|
||||
OSTREE_OSNAME=fedora
|
||||
OS_VARIANT="fedora36"
|
||||
EMBEDED_CONTAINER="false"
|
||||
;;
|
||||
"rhel-8.7")
|
||||
OSTREE_REF="test/rhel/8/${ARCH}/edge"
|
||||
OS_VARIANT="rhel8-unknown"
|
||||
EMBEDED_CONTAINER="true"
|
||||
;;
|
||||
"rhel-9.1")
|
||||
OSTREE_REF="test/rhel/9/${ARCH}/edge"
|
||||
OS_VARIANT="rhel9-unknown"
|
||||
EMBEDED_CONTAINER="true"
|
||||
;;
|
||||
"centos-8")
|
||||
OSTREE_REF="test/centos/8/${ARCH}/edge"
|
||||
OS_VARIANT="centos8"
|
||||
EMBEDED_CONTAINER="true"
|
||||
;;
|
||||
"centos-9")
|
||||
OSTREE_REF="test/centos/9/${ARCH}/edge"
|
||||
OS_VARIANT="centos-stream9"
|
||||
EMBEDED_CONTAINER="true"
|
||||
;;
|
||||
*)
|
||||
echo "unsupported distro: ${ID}-${VERSION_ID}"
|
||||
|
|
@ -389,6 +395,14 @@ home = "/home/admin/"
|
|||
groups = ["wheel"]
|
||||
EOF
|
||||
|
||||
# RHEL 8.7 and 9.1 later support embeded container in commit
|
||||
if [[ "${EMBEDED_CONTAINER}" == "true" ]]; then
|
||||
tee -a "$BLUEPRINT_FILE" > /dev/null << EOF
|
||||
[[containers]]
|
||||
source = "quay.io/fedora/fedora:latest"
|
||||
EOF
|
||||
fi
|
||||
|
||||
greenprint "📄 container blueprint"
|
||||
cat "$BLUEPRINT_FILE"
|
||||
|
||||
|
|
@ -560,7 +574,7 @@ EOF
|
|||
|
||||
# Test IoT/Edge OS
|
||||
greenprint "📼 Run Edge tests on BIOS VM"
|
||||
sudo ansible-playbook -v -i "${TEMPDIR}"/inventory -e image_type="$OSTREE_OSNAME" -e ostree_commit="${INSTALL_HASH}" /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0
|
||||
sudo ansible-playbook -v -i "${TEMPDIR}"/inventory -e image_type="$OSTREE_OSNAME" -e ostree_commit="${INSTALL_HASH}" -e embeded_container="true" /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0
|
||||
check_result
|
||||
|
||||
# Clean up BIOS VM
|
||||
|
|
@ -645,6 +659,14 @@ name = "kernel-rt"
|
|||
EOF
|
||||
fi
|
||||
|
||||
# RHEL 8.7 and 9.1 later support embeded container in commit
|
||||
if [[ "${EMBEDED_CONTAINER}" == "true" ]]; then
|
||||
tee -a "$BLUEPRINT_FILE" > /dev/null << EOF
|
||||
[[containers]]
|
||||
source = "quay.io/fedora/fedora:latest"
|
||||
EOF
|
||||
fi
|
||||
|
||||
greenprint "📄 upgrade blueprint"
|
||||
cat "$BLUEPRINT_FILE"
|
||||
|
||||
|
|
@ -739,7 +761,7 @@ ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/
|
|||
EOF
|
||||
|
||||
# Test IoT/Edge OS
|
||||
sudo ansible-playbook -v -i "${TEMPDIR}"/inventory -e image_type="$OSTREE_OSNAME" -e ostree_commit="${UPGRADE_HASH}" /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0
|
||||
sudo ansible-playbook -v -i "${TEMPDIR}"/inventory -e image_type="$OSTREE_OSNAME" -e ostree_commit="${UPGRADE_HASH}" -e embeded_container="true" /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0
|
||||
check_result
|
||||
|
||||
# Final success clean up
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ case "${ID}-${VERSION_ID}" in
|
|||
OS_VARIANT="fedora35"
|
||||
USER_IN_COMMIT="false"
|
||||
BOOT_LOCATION="https://mirrors.rit.edu/fedora/fedora/linux/releases/35/Everything/x86_64/os/"
|
||||
EMBEDED_CONTAINER="false"
|
||||
;;
|
||||
"fedora-36")
|
||||
IMAGE_TYPE=fedora-iot-commit
|
||||
|
|
@ -27,6 +28,7 @@ case "${ID}-${VERSION_ID}" in
|
|||
OS_VARIANT="fedora36"
|
||||
USER_IN_COMMIT="false"
|
||||
BOOT_LOCATION="https://mirrors.rit.edu/fedora/fedora/linux/releases/36/Everything/x86_64/os/"
|
||||
EMBEDED_CONTAINER="false"
|
||||
;;
|
||||
"rhel-8.4")
|
||||
IMAGE_TYPE=edge-commit
|
||||
|
|
@ -34,6 +36,7 @@ case "${ID}-${VERSION_ID}" in
|
|||
OS_VARIANT="rhel8.4"
|
||||
USER_IN_COMMIT="true"
|
||||
BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.4.0/BaseOS/x86_64/os/"
|
||||
EMBEDED_CONTAINER="false"
|
||||
;;
|
||||
"rhel-8.6")
|
||||
IMAGE_TYPE=edge-commit
|
||||
|
|
@ -41,12 +44,14 @@ case "${ID}-${VERSION_ID}" in
|
|||
OS_VARIANT="rhel8-unknown"
|
||||
USER_IN_COMMIT="true"
|
||||
BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.6.0/BaseOS/x86_64/os/"
|
||||
EMBEDED_CONTAINER="false"
|
||||
;;
|
||||
"rhel-8.7")
|
||||
IMAGE_TYPE=edge-commit
|
||||
OSTREE_REF="rhel/8/${ARCH}/edge"
|
||||
OS_VARIANT="rhel8-unknown"
|
||||
USER_IN_COMMIT="true"
|
||||
EMBEDED_CONTAINER="true"
|
||||
|
||||
# Use a stable installer image unless it's the nightly pipeline
|
||||
BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.6.0/BaseOS/x86_64/os/"
|
||||
|
|
@ -60,12 +65,14 @@ case "${ID}-${VERSION_ID}" in
|
|||
OS_VARIANT="rhel9.0"
|
||||
USER_IN_COMMIT="true"
|
||||
BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-9/RHEL-9/9.0.0/BaseOS/x86_64/os/"
|
||||
EMBEDED_CONTAINER="false"
|
||||
;;
|
||||
"rhel-9.1")
|
||||
IMAGE_TYPE=edge-commit
|
||||
OSTREE_REF="rhel/9/${ARCH}/edge"
|
||||
OS_VARIANT="rhel9-unknown"
|
||||
USER_IN_COMMIT="true"
|
||||
EMBEDED_CONTAINER="true"
|
||||
|
||||
# Use a stable installer image unless it's the nightly pipeline
|
||||
BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-9/RHEL-9/9.0.0/BaseOS/x86_64/os/"
|
||||
|
|
@ -79,6 +86,7 @@ case "${ID}-${VERSION_ID}" in
|
|||
OS_VARIANT="centos8"
|
||||
USER_IN_COMMIT="true"
|
||||
BOOT_LOCATION="http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/"
|
||||
EMBEDED_CONTAINER="true"
|
||||
;;
|
||||
"centos-9")
|
||||
IMAGE_TYPE=edge-commit
|
||||
|
|
@ -86,6 +94,7 @@ case "${ID}-${VERSION_ID}" in
|
|||
OS_VARIANT="centos-stream9"
|
||||
USER_IN_COMMIT="true"
|
||||
BOOT_LOCATION="https://odcs.stream.centos.org/production/latest-CentOS-Stream/compose/BaseOS/x86_64/os/"
|
||||
EMBEDED_CONTAINER="true"
|
||||
;;
|
||||
*)
|
||||
echo "unsupported distro: ${ID}-${VERSION_ID}"
|
||||
|
|
@ -335,6 +344,14 @@ groups = ["wheel"]
|
|||
EOF
|
||||
fi
|
||||
|
||||
# RHEL 8.7 and 9.1 later support embeded container in commit
|
||||
if [[ "${EMBEDED_CONTAINER}" == "true" ]]; then
|
||||
tee -a "$BLUEPRINT_FILE" > /dev/null << EOF
|
||||
[[containers]]
|
||||
source = "quay.io/fedora/fedora:latest"
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Build installation image.
|
||||
build_image "$BLUEPRINT_FILE" ostree
|
||||
|
||||
|
|
@ -504,6 +521,14 @@ groups = ["wheel"]
|
|||
EOF
|
||||
fi
|
||||
|
||||
# RHEL 8.7 and 9.1 later support embeded container in commit
|
||||
if [[ "${EMBEDED_CONTAINER}" == "true" ]]; then
|
||||
tee -a "$BLUEPRINT_FILE" > /dev/null << EOF
|
||||
[[containers]]
|
||||
source = "quay.io/fedora/fedora:latest"
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Build upgrade image.
|
||||
build_image "$BLUEPRINT_FILE" upgrade
|
||||
|
||||
|
|
@ -570,7 +595,7 @@ ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/
|
|||
EOF
|
||||
|
||||
# Test IoT/Edge OS
|
||||
sudo ansible-playbook -v -i "${TEMPDIR}"/inventory -e image_type=${IMAGE_TYPE} -e ostree_commit="${UPGRADE_HASH}" /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0
|
||||
sudo ansible-playbook -v -i "${TEMPDIR}"/inventory -e image_type=${IMAGE_TYPE} -e ostree_commit="${UPGRADE_HASH}" -e embeded_container="true" /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0
|
||||
check_result
|
||||
|
||||
# Final success clean up
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue