From f279b985e2c07c2c2b6964f652b90ae15f3d717b Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 12 Mar 2024 10:03:32 +0100 Subject: [PATCH 1/4] Add missing imagestreams for Postgresql 16 Signed-off-by: Petr "Stone" Hracek --- imagestreams/postgresql-centos.json | 36 ++++++++++++ imagestreams/postgresql-rhel-aarch64.json | 72 +++++++++++++++++++++++ imagestreams/postgresql-rhel.json | 36 ++++++++++++ 3 files changed, 144 insertions(+) diff --git a/imagestreams/postgresql-centos.json b/imagestreams/postgresql-centos.json index ce9a2990..db1ea9d9 100644 --- a/imagestreams/postgresql-centos.json +++ b/imagestreams/postgresql-centos.json @@ -26,6 +26,24 @@ "type": "Local" } }, + { + "name": "16-el9", + "annotations": { + "openshift.io/display-name": "PostgreSQL 16 (CentOS Stream 9)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Provides a PostgreSQL 16 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "tags": "database,postgresql", + "version": "16" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/sclorg/postgresql-16-c9s:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "15-el9", "annotations": { @@ -62,6 +80,24 @@ "type": "Local" } }, + { + "name": "16-el8", + "annotations": { + "openshift.io/display-name": "PostgreSQL 16 (CentOS Stream 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Provides a PostgreSQL 16 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "tags": "database,postgresql", + "version": "16" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/sclorg/postgresql-16-c8s:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "15-el8", "annotations": { diff --git a/imagestreams/postgresql-rhel-aarch64.json b/imagestreams/postgresql-rhel-aarch64.json index db5121c2..6c8821a3 100644 --- a/imagestreams/postgresql-rhel-aarch64.json +++ b/imagestreams/postgresql-rhel-aarch64.json @@ -26,6 +26,42 @@ "type": "Local" } }, + { + "name": "16-el9", + "annotations": { + "openshift.io/display-name": "PostgreSQL 16 (RHEL 9)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Provides a PostgreSQL 16 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "tags": "database,postgresql", + "version": "16" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/rhel9/postgresql-16:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "15-el9", + "annotations": { + "openshift.io/display-name": "PostgreSQL 15 (RHEL 9)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Provides a PostgreSQL 15 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "tags": "database,postgresql", + "version": "15" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/rhel9/postgresql-15:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "13-el9", "annotations": { @@ -44,6 +80,42 @@ "type": "Local" } }, + { + "name": "16-el8", + "annotations": { + "openshift.io/display-name": "PostgreSQL 16 (RHEL 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Provides a PostgreSQL 16 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "tags": "database,postgresql", + "version": "16" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/rhel8/postgresql-16:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "15-el8", + "annotations": { + "openshift.io/display-name": "PostgreSQL 15 (RHEL 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Provides a PostgreSQL 15 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "tags": "database,postgresql", + "version": "15" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/rhel8/postgresql-15:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "13-el8", "annotations": { diff --git a/imagestreams/postgresql-rhel.json b/imagestreams/postgresql-rhel.json index 4e698ced..45d44452 100644 --- a/imagestreams/postgresql-rhel.json +++ b/imagestreams/postgresql-rhel.json @@ -23,6 +23,24 @@ "name": "15-el8" } }, + { + "name": "16-el9", + "annotations": { + "openshift.io/display-name": "PostgreSQL 16 (RHEL 9)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Provides a PostgreSQL 16 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "tags": "database,postgresql", + "version": "16" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/rhel9/postgresql-16:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "15-el9", "annotations": { @@ -41,6 +59,24 @@ "type": "Local" } }, + { + "name": "16-el8", + "annotations": { + "openshift.io/display-name": "PostgreSQL 16 (RHEL 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Provides a PostgreSQL 16 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "tags": "database,postgresql", + "version": "16" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/rhel8/postgresql-16:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "15-el8", "annotations": { From d22afbad64afd250c5f7201ffb136ce78b28e80c Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 12 Mar 2024 12:22:16 +0100 Subject: [PATCH 2/4] Add workaround for postgresql-16 that is not released yet. Let's test integration with postgresql-15 that is already released Signed-off-by: Petr "Stone" Hracek --- test/test-lib-postgresql.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test-lib-postgresql.sh b/test/test-lib-postgresql.sh index 998c6814..b0c8ed3a 100644 --- a/test/test-lib-postgresql.sh +++ b/test/test-lib-postgresql.sh @@ -18,6 +18,11 @@ function test_postgresql_integration() { namespace_image="rhscl/postgresql-${VERSION}-rhel7" else namespace_image="${OS}/postgresql-${VERSION}" + # In case we test postgresql-16 that is not released yet + # let's use postgresql-15 + if [ "${VERSION}" == "16" ]; then + namespace_image="${OS}/postgresql-15" + fi fi TEMPLATES="postgresql-ephemeral-template.json postgresql-persistent-template.json" From f8e6b12e83cc685783540c458b25ee4f473d0d7e Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 12 Mar 2024 12:44:08 +0100 Subject: [PATCH 3/4] Skipping tests because imagestreams does not exist yet Signed-off-by: Petr "Stone" Hracek --- test/test-lib-postgresql.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/test/test-lib-postgresql.sh b/test/test-lib-postgresql.sh index b0c8ed3a..889cfbf0 100644 --- a/test/test-lib-postgresql.sh +++ b/test/test-lib-postgresql.sh @@ -18,10 +18,14 @@ function test_postgresql_integration() { namespace_image="rhscl/postgresql-${VERSION}-rhel7" else namespace_image="${OS}/postgresql-${VERSION}" - # In case we test postgresql-16 that is not released yet - # let's use postgresql-15 - if [ "${VERSION}" == "16" ]; then - namespace_image="${OS}/postgresql-15" + # 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}=postgresql-image=${VERSION}" "$devel_file" ; then + echo "This version is currently developed, so skipping this test." + return + fi fi fi TEMPLATES="postgresql-ephemeral-template.json @@ -47,6 +51,15 @@ function test_postgresql_imagestream() { elif [ "${OS}" == "rhel9" ]; then tag="-el9" 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}=postgresql-image=${VERSION}" "$devel_file" ; then + echo "This version is currently developed, so skipping this test." + return + fi + fi TEMPLATES="postgresql-ephemeral-template.json postgresql-persistent-template.json" for template in $TEMPLATES; do From 43eef0248750eb280aeb08e9607b043393c7a093 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Mon, 18 Mar 2024 13:57:35 +0100 Subject: [PATCH 4/4] Fix container name in devel_images file Signed-off-by: Petr "Stone" Hracek --- test/test-lib-postgresql.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-lib-postgresql.sh b/test/test-lib-postgresql.sh index 889cfbf0..d8e4089e 100644 --- a/test/test-lib-postgresql.sh +++ b/test/test-lib-postgresql.sh @@ -22,7 +22,7 @@ function test_postgresql_integration() { # 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}=postgresql-image=${VERSION}" "$devel_file" ; then + if grep -q "${OS}=postgresql-container=${VERSION}" "$devel_file" ; then echo "This version is currently developed, so skipping this test." return fi @@ -55,7 +55,7 @@ function test_postgresql_imagestream() { # 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}=postgresql-image=${VERSION}" "$devel_file" ; then + if grep -q "${OS}=postgresql-container=${VERSION}" "$devel_file" ; then echo "This version is currently developed, so skipping this test." return fi