Skip to content

Commit

Permalink
Get rid off OpenShift 3 tests and testing from GitHub Action. (#227)
Browse files Browse the repository at this point in the history
* Get rid off OpenShift 3 tests and testing from GitHub Action.

Update also documentation to OpenShift 4 source to image page

Signed-off-by: Petr "Stone" Hracek <[email protected]>

* Get rid off CentOS 7 tests as well.

Signed-off-by: Petr "Stone" Hracek <[email protected]>

* Skipping tests for unreleased images

Signed-off-by: Petr "Stone" Hracek <[email protected]>

---------

Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek authored Mar 20, 2024
1 parent 98b5967 commit fdc08c7
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 81 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/openshift-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,8 @@ jobs:
fail-fast: false
matrix:
version: [ "10.3", "10.5", "10.11" ]
os_test: [ "centos7", "rhel7", "rhel8", "rhel9"]
test_case: [ "openshift-3", "openshift-4" ]
exclude:
- test_case: "openshift-4"
os_test: "centos7"
- test_case: "openshift-3"
os_test: "rhel8"
- test_case: "openshift-3"
os_test: "rhel9"
os_test: [ "rhel7", "rhel8", "rhel9"]
test_case: [ "openshift-4" ]

if: |
github.event.issue.pull_request
Expand Down
2 changes: 1 addition & 1 deletion 10.11/root/usr/share/container-scripts/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ location is `/etc/my.cnf` but you can change it to `/etc/mysql/my.cnf` by settin
Extending image
---------------
This image can be extended in Openshift using the `Source` build strategy or via the standalone
[source-to-image](https://github.com/openshift/source-to-image) application (where available).
[source-to-image](https://docs.openshift.com/container-platform/4.14/openshift_images/create-images.html#images-create-s2i_create-images) application (where available).
For this, we will assume that you are using the `rhel8/mariadb-1011` image,
available via `mariadb:10.11` imagestream tag in Openshift.

Expand Down
2 changes: 1 addition & 1 deletion 10.3/root/usr/share/container-scripts/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ location is `/etc/my.cnf` but you can change it to `/etc/mysql/my.cnf` by settin
Extending image
---------------
This image can be extended in Openshift using the `Source` build strategy or via the standalone
[source-to-image](https://github.com/openshift/source-to-image) application (where available).
[source-to-image](https://docs.openshift.com/container-platform/4.14/openshift_images/create-images.html#images-create-s2i_create-images) application (where available).
For this, we will assume that you are using the `rhscl/mariadb-103-rhel7` image,
available via `mariadb:10.3` imagestream tag in Openshift.

Expand Down
2 changes: 1 addition & 1 deletion 10.5/root/usr/share/container-scripts/mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ location is `/etc/my.cnf` but you can change it to `/etc/mysql/my.cnf` by settin
Extending image
---------------
This image can be extended in Openshift using the `Source` build strategy or via the standalone
[source-to-image](https://github.com/openshift/source-to-image) application (where available).
[source-to-image](https://docs.openshift.com/container-platform/4.14/openshift_images/create-images.html#images-create-s2i_create-images) application (where available).
For this, we will assume that you are using the `rhscl/mariadb-105-rhel7` image,
available via `mariadb:10.5` imagestream tag in Openshift.

Expand Down
1 change: 0 additions & 1 deletion test/run-openshift

This file was deleted.

68 changes: 0 additions & 68 deletions test/run-openshift-local-cluster

This file was deleted.

42 changes: 42 additions & 0 deletions test/test-lib-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ function test_mariadb_integration() {
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}=postgresql-container=${VERSION}" "$devel_file" ; then
echo "This version is currently developed, so skipping this test."
return
fi
fi
fi
for template in $TEMPLATES; do
ct_os_test_template_app_func "${IMAGE_NAME}" \
Expand All @@ -143,6 +152,17 @@ function test_mariadb_imagestream() {
elif [ "${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}=postgresql-container=${VERSION}" "$devel_file" ; then
echo "This version is currently developed, so skipping this test."
return
fi
fi
fi
TEMPLATES="mariadb-ephemeral-template.json
mariadb-persistent-template.json"
for template in $TEMPLATES; do
Expand All @@ -151,6 +171,17 @@ 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}=postgresql-container=${VERSION}" "$devel_file" ; then
echo "This version is currently developed, so skipping this test."
return
fi
fi
fi
TEMPLATES="mariadb-ephemeral-template.json
mariadb-persistent-template.json"
for template in $TEMPLATES; do
Expand All @@ -162,6 +193,17 @@ function test_mariadb_template() {
# Check the latest imagestreams
function run_latest_imagestreams() {
local result=1
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}=postgresql-container=${VERSION}" "$devel_file" ; then
echo "This version is currently developed, so skipping this test."
return
fi
fi
fi
# Switch to root directory of a container
echo "Testing the latest version in imagestreams"
pushd "${THISDIR}/../.." >/dev/null || return 1
Expand Down

0 comments on commit fdc08c7

Please sign in to comment.