From 69c3d00c3ab27326b8c024bcb64733c7096c684e Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Thu, 27 Jun 2024 12:40:08 +0200 Subject: [PATCH] Remove support for building and testing mariadb on RHEL-7 Signed-off-by: Petr "Stone" Hracek --- .github/workflows/container-tests.yml | 2 +- .github/workflows/openshift-tests.yml | 2 +- 10.5/.exclude-rhel7 | 0 imagestreams/imagestreams.yaml | 3 -- imagestreams/mariadb-rhel.json | 36 --------------- test/run-openshift-remote-cluster | 2 +- test/test-lib-mysql.sh | 64 +++++++++++---------------- 7 files changed, 30 insertions(+), 79 deletions(-) create mode 100644 10.5/.exclude-rhel7 diff --git a/.github/workflows/container-tests.yml b/.github/workflows/container-tests.yml index 8d959740..b49dbd96 100644 --- a/.github/workflows/container-tests.yml +++ b/.github/workflows/container-tests.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: version: [ "10.3", "10.5", "10.11" ] - os_test: [ "fedora", "rhel7", "rhel8", "rhel9", "c9s"] + os_test: [ "fedora", "rhel8", "rhel9", "c9s"] test_case: [ "container" ] if: | diff --git a/.github/workflows/openshift-tests.yml b/.github/workflows/openshift-tests.yml index bdac0ab9..3c7d3c8a 100644 --- a/.github/workflows/openshift-tests.yml +++ b/.github/workflows/openshift-tests.yml @@ -28,7 +28,7 @@ jobs: fail-fast: false matrix: version: [ "10.3", "10.5", "10.11" ] - os_test: [ "rhel7", "rhel8", "rhel9"] + os_test: [ "rhel8", "rhel9"] test_case: [ "openshift-4" ] steps: diff --git a/10.5/.exclude-rhel7 b/10.5/.exclude-rhel7 new file mode 100644 index 00000000..e69de29b diff --git a/imagestreams/imagestreams.yaml b/imagestreams/imagestreams.yaml index 1ca038c6..e98034f2 100644 --- a/imagestreams/imagestreams.yaml +++ b/imagestreams/imagestreams.yaml @@ -17,9 +17,6 @@ - filename: mariadb-rhel.json latest: "10.11-el9" distros: - - name: RHEL 7 - app_versions: ["10.3", "10.5"] - - name: RHEL 8 app_versions: ["10.3", "10.5", "10.11"] diff --git a/imagestreams/mariadb-rhel.json b/imagestreams/mariadb-rhel.json index 83ea49cd..d950ef8d 100644 --- a/imagestreams/mariadb-rhel.json +++ b/imagestreams/mariadb-rhel.json @@ -9,42 +9,6 @@ }, "spec": { "tags": [ - { - "name": "10.3-el7", - "annotations": { - "openshift.io/display-name": "MariaDB 10.3 (RHEL 7)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MariaDB 10.3 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", - "iconClass": "icon-mariadb", - "tags": "database,mariadb", - "version": "10.3" - }, - "from": { - "kind": "DockerImage", - "name": "registry.redhat.io/rhscl/mariadb-103-rhel7:latest" - }, - "referencePolicy": { - "type": "Local" - } - }, - { - "name": "10.5-el7", - "annotations": { - "openshift.io/display-name": "MariaDB 10.5 (RHEL 7)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MariaDB 10.5 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.", - "iconClass": "icon-mariadb", - "tags": "database,mariadb", - "version": "10.5" - }, - "from": { - "kind": "DockerImage", - "name": "registry.redhat.io/rhscl/mariadb-105-rhel7:latest" - }, - "referencePolicy": { - "type": "Local" - } - }, { "name": "10.3-el8", "annotations": { diff --git a/test/run-openshift-remote-cluster b/test/run-openshift-remote-cluster index 56cfb2dd..cf0a1e62 100755 --- a/test/run-openshift-remote-cluster +++ b/test/run-openshift-remote-cluster @@ -5,7 +5,7 @@ # IMAGE_NAME specifies a name of the candidate image used for testing. # The image has to be available before this script is executed. # VERSION specifies the major version of the MariaDB in format of X.Y -# OS specifies RHEL version (e.g. OS=rhel7) +# OS specifies RHEL version (e.g. OS=rhel8) # THISDIR=$(dirname ${BASH_SOURCE[0]}) diff --git a/test/test-lib-mysql.sh b/test/test-lib-mysql.sh index a8420fb0..e9080634 100755 --- a/test/test-lib-mysql.sh +++ b/test/test-lib-mysql.sh @@ -45,7 +45,7 @@ function check_mysql_os_service_connection() { } function test_mysql_pure_image() { - local image_name=${1:-quay.io/centos7/mariadb-103-centos7} + local image_name=${1:-quay.io/sclorg/mariadb-105-c9s} local image_name_no_namespace=${image_name##*/} local service_name="${image_name_no_namespace%%:*}-testing" @@ -64,7 +64,7 @@ function test_mysql_pure_image() { } function test_mysql_template() { - local image_name=${1:-quay.io/centos7/mariadb-103-centos7} + local image_name=${1:-quay.io/sclorg/mariadb-105-c9s} local image_name_no_namespace=${image_name##*/} local service_name="${image_name_no_namespace%%:*}-testing" @@ -86,7 +86,7 @@ function test_mysql_template() { } function test_mysql_s2i() { - local image_name=${1:-quay.io/centos7/mariadb-103-centos7} + local image_name=${1:-quay.io/sclorg/mariadb-105-c9s} local app=${2:-https://github.com/sclorg/mariadb-container.git} local context_dir=${3:-test/test-app} local image_name_no_namespace=${image_name##*/} @@ -117,18 +117,14 @@ function test_mariadb_integration() { TEMPLATES="mariadb-ephemeral-template.json mariadb-persistent-template.json" SHORT_VERSION="${VERSION//.}" - if [ "${OS}" == "rhel7" ]; then - namespace_image="rhscl/mariadb-${SHORT_VERSION}-rhel7" - else - namespace_image="${OS}/mariadb-${SHORT_VERSION}" - # Check if the current version is already GA - # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' - local devel_file="/root/sclorg-tmt-plans/devel_images" - if [ -f "${devel_file}" ]; then - if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then - echo "This version is currently developed, so skipping this test." - return - fi + namespace_image="${OS}/mariadb-${SHORT_VERSION}" + # Check if the current version is already GA + # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' + local devel_file="/root/sclorg-tmt-plans/devel_images" + if [ -f "${devel_file}" ]; then + if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then + echo "This version is currently developed, so skipping this test." + return fi fi for template in $TEMPLATES; do @@ -146,21 +142,17 @@ function test_mariadb_integration() { # Check the imagestream function test_mariadb_imagestream() { - local tag="-el7" - if [ "${OS}" == "rhel8" ]; then - tag="-el8" - elif [ "${OS}" == "rhel9" ]; then + local tag="-el8" + if [ "${OS}" == "rhel9" ]; then tag="-el9" fi - if [ "${OS}" != "rhel7" ]; then - # Check if the current version is already GA - # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' - local devel_file="/root/sclorg-tmt-plans/devel_images" - if [ -f "${devel_file}" ]; then - if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then - echo "This version is currently developed, so skipping this test." - return - fi + # Check if the current version is already GA + # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' + local devel_file="/root/sclorg-tmt-plans/devel_images" + if [ -f "${devel_file}" ]; then + if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then + echo "This version is currently developed, so skipping this test." + return fi fi TEMPLATES="mariadb-ephemeral-template.json @@ -171,15 +163,13 @@ function test_mariadb_imagestream() { } function test_mariadb_template() { - if [ "${OS}" != "rhel7" ]; then - # Check if the current version is already GA - # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' - local devel_file="/root/sclorg-tmt-plans/devel_images" - if [ -f "${devel_file}" ]; then - if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then - echo "This version is currently developed, so skipping this test." - return - fi + # Check if the current version is already GA + # This directory is cloned from TMT plan repo 'sclorg-tmt-plans' + local devel_file="/root/sclorg-tmt-plans/devel_images" + if [ -f "${devel_file}" ]; then + if grep -q "${OS}=mariadb-container=${VERSION}" "$devel_file" ; then + echo "This version is currently developed, so skipping this test." + return fi fi TEMPLATES="mariadb-ephemeral-template.json