diff --git a/7.3/test/__init__.py b/7.3/test/__init__.py new file mode 120000 index 000000000..d0f4746a3 --- /dev/null +++ b/7.3/test/__init__.py @@ -0,0 +1 @@ +../../test/__init__.py \ No newline at end of file diff --git a/7.3/test/constants.py b/7.3/test/constants.py new file mode 120000 index 000000000..360f725b2 --- /dev/null +++ b/7.3/test/constants.py @@ -0,0 +1 @@ +../../test/constants.py \ No newline at end of file diff --git a/7.4/test/__init__.py b/7.4/test/__init__.py new file mode 120000 index 000000000..d0f4746a3 --- /dev/null +++ b/7.4/test/__init__.py @@ -0,0 +1 @@ +../../test/__init__.py \ No newline at end of file diff --git a/7.4/test/constants.py b/7.4/test/constants.py new file mode 120000 index 000000000..360f725b2 --- /dev/null +++ b/7.4/test/constants.py @@ -0,0 +1 @@ +../../test/constants.py \ No newline at end of file diff --git a/8.0/test/__init__.py b/8.0/test/__init__.py new file mode 120000 index 000000000..d0f4746a3 --- /dev/null +++ b/8.0/test/__init__.py @@ -0,0 +1 @@ +../../test/__init__.py \ No newline at end of file diff --git a/8.0/test/constants.py b/8.0/test/constants.py new file mode 120000 index 000000000..360f725b2 --- /dev/null +++ b/8.0/test/constants.py @@ -0,0 +1 @@ +../../test/constants.py \ No newline at end of file diff --git a/8.1/test/__init__.py b/8.1/test/__init__.py new file mode 120000 index 000000000..d0f4746a3 --- /dev/null +++ b/8.1/test/__init__.py @@ -0,0 +1 @@ +../../test/__init__.py \ No newline at end of file diff --git a/8.1/test/constants.py b/8.1/test/constants.py new file mode 120000 index 000000000..360f725b2 --- /dev/null +++ b/8.1/test/constants.py @@ -0,0 +1 @@ +../../test/constants.py \ No newline at end of file diff --git a/8.2/test/__init__.py b/8.2/test/__init__.py new file mode 120000 index 000000000..d0f4746a3 --- /dev/null +++ b/8.2/test/__init__.py @@ -0,0 +1 @@ +../../test/__init__.py \ No newline at end of file diff --git a/8.2/test/constants.py b/8.2/test/constants.py new file mode 120000 index 000000000..360f725b2 --- /dev/null +++ b/8.2/test/constants.py @@ -0,0 +1 @@ +../../test/constants.py \ No newline at end of file diff --git a/8.3/test/__init__.py b/8.3/test/__init__.py new file mode 120000 index 000000000..d0f4746a3 --- /dev/null +++ b/8.3/test/__init__.py @@ -0,0 +1 @@ +../../test/__init__.py \ No newline at end of file diff --git a/8.3/test/constants.py b/8.3/test/constants.py new file mode 120000 index 000000000..360f725b2 --- /dev/null +++ b/8.3/test/constants.py @@ -0,0 +1 @@ +../../test/constants.py \ No newline at end of file diff --git a/imagestreams/imagestreams.yaml b/imagestreams/imagestreams.yaml index d74ff586c..de4f899ef 100644 --- a/imagestreams/imagestreams.yaml +++ b/imagestreams/imagestreams.yaml @@ -11,29 +11,38 @@ https://github.com/sclorg/s2i-php-container/blob/master/APP_VERSION/README.md. imagestream_files: - filename: php-centos.json - latest: "8.0-ubi8" + latest: "8.3-ubi9" distros: - name: UBI 8 app_versions: ["7.4", "8.0", "8.2"] - name: UBI 9 - app_versions: ["8.0", "8.1", "8.2"] + app_versions: ["8.0", "8.1", "8.2", "8.3"] + + - name: UBI 10 + app_versions: ["8.3"] - filename: php-rhel.json - latest: "8.0-ubi8" + latest: "8.3-ubi9" distros: - name: UBI 8 app_versions: ["7.4", "8.0", "8.2"] - name: UBI 9 - app_versions: ["8.0", "8.1", "8.2"] + app_versions: ["8.0", "8.1", "8.2", "8.3"] + + - name: UBI 10 + app_versions: ["8.3"] - filename: php-rhel-aarch64.json - latest: "8.0-ubi8" + latest: "8.3-ubi9" distros: - name: UBI 8 app_versions: ["7.4", "8.0", "8.2"] - name: UBI 9 - app_versions: ["8.0", "8.1", "8.2"] + app_versions: ["8.0", "8.1", "8.2", "8.3"] + + - name: UBI 10 + app_versions: ["8.3"] ... diff --git a/imagestreams/php-centos.json b/imagestreams/php-centos.json index c4bf7167e..11d0914ed 100644 --- a/imagestreams/php-centos.json +++ b/imagestreams/php-centos.json @@ -123,20 +123,58 @@ "type": "Local" } }, + { + "name": "8.3-ubi9", + "annotations": { + "openshift.io/display-name": "PHP 8.3 (UBI 9)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Build and run PHP 8.3 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.", + "iconClass": "icon-php", + "tags": "builder,php", + "version": "8.3", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi9/php-83:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "8.3-ubi10", + "annotations": { + "openshift.io/display-name": "PHP 8.3 (UBI 10)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Build and run PHP 8.3 applications on UBI 10. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.", + "iconClass": "icon-php", + "tags": "builder,php", + "version": "8.3", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi10/php-83:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "latest", "annotations": { - "openshift.io/display-name": "PHP 8.0 (Latest)", + "openshift.io/display-name": "PHP 8.3 (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Build and run PHP 8.0 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.0/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version available on OpenShift, including major version updates.\n", + "description": "Build and run PHP 8.3 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version available on OpenShift, including major version updates.\n", "iconClass": "icon-php", "tags": "builder,php", - "version": "8.0", + "version": "8.3", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" }, "from": { "kind": "ImageStreamTag", - "name": "8.0-ubi8" + "name": "8.3-ubi9" }, "referencePolicy": { "type": "Local" diff --git a/imagestreams/php-rhel-aarch64.json b/imagestreams/php-rhel-aarch64.json index 17fb53f75..0491dc372 100644 --- a/imagestreams/php-rhel-aarch64.json +++ b/imagestreams/php-rhel-aarch64.json @@ -123,20 +123,58 @@ "type": "Local" } }, + { + "name": "8.3-ubi9", + "annotations": { + "openshift.io/display-name": "PHP 8.3 (UBI 9)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Build and run PHP 8.3 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.", + "iconClass": "icon-php", + "tags": "builder,php", + "version": "8.3", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/ubi9/php-83:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "8.3-ubi10", + "annotations": { + "openshift.io/display-name": "PHP 8.3 (UBI 10)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Build and run PHP 8.3 applications on UBI 10. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.", + "iconClass": "icon-php", + "tags": "builder,php", + "version": "8.3", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/ubi10/php-83:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "latest", "annotations": { - "openshift.io/display-name": "PHP 8.0 (Latest)", + "openshift.io/display-name": "PHP 8.3 (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Build and run PHP 8.0 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.0/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version available on OpenShift, including major version updates.\n", + "description": "Build and run PHP 8.3 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version available on OpenShift, including major version updates.\n", "iconClass": "icon-php", "tags": "builder,php", - "version": "8.0", + "version": "8.3", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" }, "from": { "kind": "ImageStreamTag", - "name": "8.0-ubi8" + "name": "8.3-ubi9" }, "referencePolicy": { "type": "Local" diff --git a/imagestreams/php-rhel.json b/imagestreams/php-rhel.json index 17fb53f75..0491dc372 100644 --- a/imagestreams/php-rhel.json +++ b/imagestreams/php-rhel.json @@ -123,20 +123,58 @@ "type": "Local" } }, + { + "name": "8.3-ubi9", + "annotations": { + "openshift.io/display-name": "PHP 8.3 (UBI 9)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Build and run PHP 8.3 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.", + "iconClass": "icon-php", + "tags": "builder,php", + "version": "8.3", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/ubi9/php-83:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "8.3-ubi10", + "annotations": { + "openshift.io/display-name": "PHP 8.3 (UBI 10)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "description": "Build and run PHP 8.3 applications on UBI 10. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.", + "iconClass": "icon-php", + "tags": "builder,php", + "version": "8.3", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" + }, + "from": { + "kind": "DockerImage", + "name": "registry.redhat.io/ubi10/php-83:latest" + }, + "referencePolicy": { + "type": "Local" + } + }, { "name": "latest", "annotations": { - "openshift.io/display-name": "PHP 8.0 (Latest)", + "openshift.io/display-name": "PHP 8.3 (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Build and run PHP 8.0 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.0/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version available on OpenShift, including major version updates.\n", + "description": "Build and run PHP 8.3 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.3/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version available on OpenShift, including major version updates.\n", "iconClass": "icon-php", "tags": "builder,php", - "version": "8.0", + "version": "8.3", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git" }, "from": { "kind": "ImageStreamTag", - "name": "8.0-ubi8" + "name": "8.3-ubi9" }, "referencePolicy": { "type": "Local" diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/test/constants.py b/test/constants.py new file mode 100644 index 000000000..e0402ba6a --- /dev/null +++ b/test/constants.py @@ -0,0 +1,5 @@ +TAGS = { + "rhel8": "-ubi8", + "rhel9": "-ubi9", + "rhel10": "-ubi10", +} diff --git a/test/test-lib-php.sh b/test/test-lib-php.sh index d4c68f177..af364346e 100644 --- a/test/test-lib-php.sh +++ b/test/test-lib-php.sh @@ -20,10 +20,6 @@ function test_php_integration() { # Check the imagestream function test_php_imagestream() { - if [ "$OS" == "rhel10" ]; then - echo "Imagestreams are not released yet for RHEL10. Let's skip this test." - return - fi ct_os_test_image_stream_s2i "${THISDIR}/imagestreams/php-${OS%[0-9]*}.json" "${IMAGE_NAME}" \ "https://github.com/sclorg/s2i-php-container.git" \ test/test-app \ @@ -34,10 +30,6 @@ function test_php_imagestream() { function test_php_template() { local supported_use_case local check_msg - if [ "$OS" == "rhel10" ]; then - echo "Imagestreams are not released yet for RHEL10. Let's skip this test." - return - fi if [ "${VERSION}" == "7.4" ] || [ "${VERSION}" == "8.0" ]; then supported_use_case="True" BRANCH_TO_TEST="4.X" diff --git a/test/test_php_deploy_templates.py b/test/test_php_deploy_templates.py index 1d5312dff..d8916efc2 100644 --- a/test/test_php_deploy_templates.py +++ b/test/test_php_deploy_templates.py @@ -5,6 +5,8 @@ from container_ci_suite.openshift import OpenShiftAPI from container_ci_suite.utils import check_variables +from constants import TAGS + if not check_variables(): print("At least one variable from IMAGE_NAME, OS, VERSION is missing.") sys.exit(1) @@ -24,11 +26,7 @@ branch_to_test = "master" check_msg = "Welcome to your CakePHP application on OpenShift" -TAGS = { - "rhel8": "-ubi8", - "rhel9": "-ubi9" -} -TAG = TAGS.get(OS, None) +TAG = TAGS.get(OS) new_version = VERSION.replace(".", "") @@ -53,10 +51,6 @@ def teardown_method(self): ] ) def test_php_template_inside_cluster(self, template): - if OS == "rhel10": - pytest.skip("Do NOT test on RHEL10 yet.") - if VERSION == "8.3": - pytest.skip("Do NOT test on version 8.3 yet.") self.oc_api.import_is("imagestreams/php-rhel.json", "", skip_check=True) service_name = f"php-{new_version}-testing" template_url = self.oc_api.get_raw_url_for_json( diff --git a/test/test_php_s2i_imagestreams.py b/test/test_php_s2i_imagestreams.py index 1c19cf0cd..ce865b4a9 100644 --- a/test/test_php_s2i_imagestreams.py +++ b/test/test_php_s2i_imagestreams.py @@ -27,10 +27,6 @@ def teardown_method(self): self.oc_api.delete_project() def test_php_template_inside_cluster(self): - if OS == "rhel10": - pytest.skip("Do NOT test on RHEL10 yet.") - if VERSION == "8.3": - pytest.skip("Do NOT test on version 8.3 yet.") service_name = f"php-{SHORT_VERSION}-testing" assert self.oc_api.deploy_imagestream_s2i( imagestream_file="imagestreams/php-rhel.json", diff --git a/test/test_shared_helm_cakephp_application.py b/test/test_shared_helm_cakephp_application.py index da1c8a7ad..6e5f3de8c 100644 --- a/test/test_shared_helm_cakephp_application.py +++ b/test/test_shared_helm_cakephp_application.py @@ -7,6 +7,8 @@ from container_ci_suite.helm import HelmChartsAPI from container_ci_suite.utils import check_variables +from constants import TAGS + if not check_variables(): print("At least one variable from IMAGE_NAME, OS, VERSION is missing.") sys.exit(1) @@ -26,11 +28,7 @@ else: check_msg = "Welcome to your CakePHP application on OpenShift" -TAGS = { - "rhel8": "-ubi8", - "rhel9": "-ubi9" -} -TAG = TAGS.get(OS, None) +TAG = TAGS.get(OS) class TestHelmCakePHPTemplate: @@ -47,43 +45,7 @@ def setup_method(self): def teardown_method(self): self.hc_api.delete_project() - def test_curl_connection(self): - if OS == "rhel10": - pytest.skip("Do NOT test on RHEL10 yet.") - if VERSION == "8.3": - pytest.skip("Do NOT test on version 8.3 yet.") - - branch_to_test = "4.X" - check_msg = "Welcome to CakePHP" - if self.hc_api.shared_cluster: - pytest.skip("Do NOT test on shared cluster") - if VERSION.startswith("8.2") or VERSION.startswith("8.3"): - branch_to_test = "5.X" - check_msg = "Welcome to CakePHP" - self.hc_api.package_name = "redhat-php-imagestreams" - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation() - self.hc_api.package_name = "redhat-php-cakephp-application" - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation( - values={ - "php_version": f"{VERSION}{TAG}", - "namespace": self.hc_api.namespace, - "source_repository_ref": branch_to_test, - "name": "cakephp-example" - } - ) - assert self.hc_api.is_s2i_pod_running(pod_name_prefix="cakephp-example", timeout=480) - assert self.hc_api.oc_api.check_response_inside_cluster( - name_in_template="cakephp-example", - expected_output=check_msg, - ) - def test_by_helm_test(self): - if OS == "rhel10": - pytest.skip("Do NOT test on RHEL10 yet.") - if VERSION == "8.3": - pytest.skip("Do NOT test on version 8.3 yet.") branch_to_test = "4.X" check_msg = "Welcome to CakePHP" if VERSION.startswith("8.2") or VERSION.startswith("8.3"): diff --git a/test/test_shared_helm_chart_imagestreams.py b/test/test_shared_helm_chart_imagestreams.py index 1996d2553..4e12ccc15 100644 --- a/test/test_shared_helm_chart_imagestreams.py +++ b/test/test_shared_helm_chart_imagestreams.py @@ -32,6 +32,8 @@ def teardown_method(self): @pytest.mark.parametrize( "version,registry,expected", [ + ("8.3-ubi10", "registry.redhat.io/ubi10/php-83:latest", True), + ("8.3-ubi9", "registry.redhat.io/ubi9/php-83:latest", True), ("8.2-ubi9", "registry.redhat.io/ubi9/php-82:latest", True), ("8.2-ubi8", "registry.redhat.io/ubi8/php-82:latest", True), ("8.1-ubi9", "registry.redhat.io/ubi9/php-81:latest", True),