From 935a8d71351fa90f48fce06159f2e483b5043c90 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 15 Apr 2026 11:21:41 +0200 Subject: [PATCH 1/2] Add support for building and testing container images on C11S and RHEL11 Signed-off-by: Petr "Stone" Hracek --- README.md | 8 +------- build.sh | 4 ++-- common.mk | 9 ++++++++- generate_version_table.py | 2 ++ test-lib.sh | 4 ++++ test.sh | 2 +- tests/failures/check/v0/Dockerfile.c11s | 2 ++ tests/failures/check/v0/Dockerfile.rhel11 | 2 ++ 8 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 tests/failures/check/v0/Dockerfile.c11s create mode 100644 tests/failures/check/v0/Dockerfile.rhel11 diff --git a/README.md b/README.md index e34d9d9d..c563dc4b 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,6 @@ Depends on `tag` as some tests might need to have the images tagged (s2i). Similar to `make test` but runs testsuite for container by PyTest, expected to be found at `$gitroot/$version/test/run-pytest` - -`make test-openshift-4` -Similar to `make test` but runs testsuite for Openshift 4, expected to be found at -`$gitroot/$version/test/run-openshift-remote-cluster` - `make test-openshift-pytest` Similar to `make test` but runs PyTest test suite `https://github.com/sclorg/container-ci-suite` for Openshift 4, expected to be found at `$gitroot/$version/test/run-openshift-pytest` @@ -101,7 +96,7 @@ Dockerfile for the scripts to know which versions to build. `OS` OS version you want to build the images for. Currently, the scripts are able to build for -c9s, c10s, rhel8, rhel9, rhel10, and fedora. +c9s, c10s, c11s, rhel8, rhel9, rhel10, rhel11, and fedora. `SKIP_SQUASH` When set to 1 the build script will skip the squash phase of the build. @@ -171,7 +166,6 @@ Dependencies for testsuite: - /usr/bin/docker (either `docker` or `podman` + `podman-docker`) - git -- go-md2man - make - source-to-image - shellcheck diff --git a/build.sh b/build.sh index a5281d7a..093e8017 100755 --- a/build.sh +++ b/build.sh @@ -2,7 +2,7 @@ # This script is used to build the OpenShift Docker images. # -# OS - Specifies distribution - "rhel8", "rhel9", "rhel10", "c9s", "c10s" or "fedora" +# OS - Specifies distribution - "rhel8", "rhel9", "rhel10", "rhel11", "c9s", "c10s" or "fedora" # VERSION - Specifies the image version - (must match with subdirectory in repo) # SINGLE_VERSION - Specifies the image version - (must match with subdirectory in repo) # VERSIONS - Must be set to a list with possible versions (subdirectories) @@ -170,7 +170,7 @@ function docker_build_with_version { # Errors during downloading metadata for repository 'rhel-9-for-x86_64-appstream-rpms': # - Curl error (56): Failure when receiving data from the peer for https:// [Received HTTP code 503 from proxy after CONNECT] # Error: Failed to download metadata for repo 'rhel-9-for-x86_64-appstream-rpms': - if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]]; then + if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]] || [[ "${OS}" == "rhel11" ]]; then # Do not fail in case of sending log to pastebin or logdetective fails. analyze_logs_by_logdetective "${tmp_file}" fi diff --git a/common.mk b/common.mk index 8029afac..69442950 100644 --- a/common.mk +++ b/common.mk @@ -40,6 +40,9 @@ else ifeq ($(TARGET),rhel9) else ifeq ($(TARGET),rhel10) OS := rhel10 DOCKERFILE ?= Dockerfile.rhel10 +else ifeq ($(TARGET),rhel11) + OS := rhel11 + DOCKERFILE ?= Dockerfile.rhel11 else ifeq ($(TARGET),fedora) OS := fedora DOCKERFILE ?= Dockerfile.fedora @@ -48,10 +51,14 @@ else ifeq ($(TARGET),c9s) OS := c9s DOCKERFILE ?= Dockerfile.c9s REGISTRY := quay.io/ -else +else ifeq ($(TARGET),c10s) OS := c10s DOCKERFILE ?= Dockerfile.c10s REGISTRY := quay.io/ +else + OS := c11s + DOCKERFILE ?= Dockerfile.c11s + REGISTRY := quay.io/ endif SKIP_SQUASH ?= 1 diff --git a/generate_version_table.py b/generate_version_table.py index ceff99dc..89f02388 100755 --- a/generate_version_table.py +++ b/generate_version_table.py @@ -7,10 +7,12 @@ distro_names = { "c9s": ["CentOS Stream 9", "quay.io/sclorg/%s-c9s"], "c10s": ["CentOS Stream 10", "quay.io/sclorg/%s-c10s"], + "c11s": ["CentOS Stream 11", "quay.io/sclorg/%s-c11s"], "fedora": ["Fedora", "quay.io/fedora/%s"], "rhel8": ["RHEL 8", "registry.redhat.io/rhel8/%s"], "rhel9": ["RHEL 9", "registry.redhat.io/rhel9/%s"], "rhel10": ["RHEL 10", "registry.redhat.io/rhel10/%s"], + "rhel11": ["RHEL 11", "registry.redhat.io/rhel11/%s"], } version_regex = re.compile(r"^VERSIONS\s*=\s*(.*)$") docker_file_regex = re.compile(r"(?<=Dockerfile\.).+") diff --git a/test-lib.sh b/test-lib.sh index 60af8134..6d6e44b3 100644 --- a/test-lib.sh +++ b/test-lib.sh @@ -738,10 +738,14 @@ ct_get_public_image_name() { public_image_name=$registry/rhel9/$base_image_name-${version//./} elif [ "$os" == "rhel10" ]; then public_image_name=$registry/rhel10/$base_image_name-${version//./} + elif [ "$os" == "rhel11" ]; then + public_image_name=$registry/rhel11/$base_image_name-${version//./} elif [ "$os" == "c9s" ]; then public_image_name=$registry/sclorg/$base_image_name-${version//./}-c9s elif [ "$os" == "c10s" ]; then public_image_name=$registry/sclorg/$base_image_name-${version//./}-c10s + elif [ "$os" == "c11s" ]; then + public_image_name=$registry/sclorg/$base_image_name-${version//./}-c11s fi echo "$public_image_name" diff --git a/test.sh b/test.sh index 38a7a3ff..662e8493 100755 --- a/test.sh +++ b/test.sh @@ -42,7 +42,7 @@ run_test_and_analyze_failed_logs() { ret_code=$? set +o pipefail if [[ "$ret_code" != "0" ]]; then - if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]]; then + if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]]|| [[ "${OS}" == "rhel11" ]]; then analyze_logs_by_logdetective "$tmp_file" fi fi diff --git a/tests/failures/check/v0/Dockerfile.c11s b/tests/failures/check/v0/Dockerfile.c11s new file mode 100644 index 00000000..4e904091 --- /dev/null +++ b/tests/failures/check/v0/Dockerfile.c11s @@ -0,0 +1,2 @@ +FROM quay.io/sclorg/s2i-core-c10s +LABEL name=test-image diff --git a/tests/failures/check/v0/Dockerfile.rhel11 b/tests/failures/check/v0/Dockerfile.rhel11 new file mode 100644 index 00000000..ee0327c8 --- /dev/null +++ b/tests/failures/check/v0/Dockerfile.rhel11 @@ -0,0 +1,2 @@ +FROM ubi10/s2i-core +LABEL name=test-image From 8e46a8ef5a6a597a8b6e2b9bdc0439c08a757928 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 16 Apr 2026 10:46:14 +0200 Subject: [PATCH 2/2] Add comment to tests/failures/check/v0/Dockerfile.rhel11 Issue for it is created here: https://github.com/sclorg/container-common-scripts/issues/425 Signed-off-by: Petr "Stone" Hracek --- tests/failures/check/v0/Dockerfile.rhel11 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/failures/check/v0/Dockerfile.rhel11 b/tests/failures/check/v0/Dockerfile.rhel11 index ee0327c8..191a6bd7 100644 --- a/tests/failures/check/v0/Dockerfile.rhel11 +++ b/tests/failures/check/v0/Dockerfile.rhel11 @@ -1,2 +1,3 @@ +# As we do not have a RHEL11 container image yet, we need to use a RHEL10 image. FROM ubi10/s2i-core LABEL name=test-image