diff --git a/.github/workflows/pkg-rust.yml b/.github/workflows/pkg-rust.yml index 5829d05..70b6a6f 100644 --- a/.github/workflows/pkg-rust.yml +++ b/.github/workflows/pkg-rust.yml @@ -26,8 +26,8 @@ # # DEB/RPM testing: # ================ -# DEB and RPM packages are tested inside LXC/LXD containers because Docker containers don't by default support init -# managers such as systemd but we want to test systemd service unit installation and activation. +# DEB and RPM packages are tested inside LXC/LXD (now Incus) containers because Docker containers don't by default +# support init managers such as systemd but we want to test systemd service unit installation and activation. # # RHEL 8/CentOS 8 support: # ======================== @@ -426,7 +426,18 @@ jobs: MODIFIED_JSON=$(echo ${PACKAGE_TEST_RULES_PROCESSED_JSON} | jq -c 'del(.image[]? | select(. == "debian:stretch")) | del(.include[]? | select(.image == "debian:stretch"))') MODIFIED_JSON=$(echo ${MODIFIED_JSON} | jq -c 'del(.include[]? | select(.os == "debian:stretch"))') if [[ "${CONTROL_JSON}" != "${MODIFIED_JSON}" ]]; then - echo "::warning::Removed debian:stretch image from package_test_rules because the LXC image no longer exists" + echo "::warning::Removed debian:stretch image from package_test_rules because the LXC/Incus image no longer exists" + PACKAGE_TEST_RULES_PROCESSED_JSON="${MODIFIED_JSON}" + fi + fi + + # Exclude ubuntu:bionic because the LXC image is no longer available. + if [[ "${PACKAGE_TEST_RULES_PROCESSED_JSON}" != "{}" ]]; then + CONTROL_JSON=$(echo ${PACKAGE_TEST_RULES_PROCESSED_JSON} | jq -c) + MODIFIED_JSON=$(echo ${PACKAGE_TEST_RULES_PROCESSED_JSON} | jq -c 'del(.image[]? | select(. == "ubuntu:bionic")) | del(.include[]? | select(.image == "debian:stretch"))') + MODIFIED_JSON=$(echo ${MODIFIED_JSON} | jq -c 'del(.include[]? | select(.os == "ubuntu:bionic"))') + if [[ "${CONTROL_JSON}" != "${MODIFIED_JSON}" ]]; then + echo "::warning::Removed ubuntu:bionic image from package_test_rules because the LXC/Incus image no longer exists" PACKAGE_TEST_RULES_PROCESSED_JSON="${MODIFIED_JSON}" fi fi