From 6915a20e96a07b6d35f401ef6a2940d205ad27c1 Mon Sep 17 00:00:00 2001 From: Petr Hracek Date: Tue, 18 Jun 2024 12:40:21 +0200 Subject: [PATCH] Add imagestream generator and YAML config for this generator (#371) * Add imagestream generator and YAML config for this generator * Add nonstandard tag that refers to RHEL7 Signed-off-by: Petr "Stone" Hracek --- .github/workflows/openshift-tests.yml | 22 +++++--- imagestreams/imagestreams.yaml | 40 ++++++++++++++ imagestreams/mysql-centos.json | 75 ++++----------------------- imagestreams/mysql-rhel-aarch64.json | 35 +++++++------ imagestreams/mysql-rhel.json | 61 +++++++++++----------- 5 files changed, 116 insertions(+), 117 deletions(-) create mode 100644 imagestreams/imagestreams.yaml diff --git a/.github/workflows/openshift-tests.yml b/.github/workflows/openshift-tests.yml index 9473766..69a55e0 100644 --- a/.github/workflows/openshift-tests.yml +++ b/.github/workflows/openshift-tests.yml @@ -3,10 +3,24 @@ on: types: - created jobs: + check-imagestreams: + runs-on: ubuntu-latest + permissions: + contents: read + statuses: write + if: | + github.event.issue.pull_request + && (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]')) + && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) + steps: + - uses: sclorg/ci-scripts/ocp-stream-generator@master + with: + ref: "refs/pull/${{ github.event.issue.number }}/head" + openshift-tests: - # This job only runs for '[test-all]' or '[test-openshift] pull request comments by owner, member name: "${{ matrix.test_case }} tests: ${{ matrix.version }} - ${{ matrix.os_test }}" - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + needs: check-imagestreams concurrency: group: ocp-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }} cancel-in-progress: true @@ -17,10 +31,6 @@ jobs: os_test: [ "rhel7", "rhel8", "rhel9"] test_case: [ "openshift-4" ] - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) steps: - uses: sclorg/tfaga-wrapper@main with: diff --git a/imagestreams/imagestreams.yaml b/imagestreams/imagestreams.yaml new file mode 100644 index 0000000..0e140fb --- /dev/null +++ b/imagestreams/imagestreams.yaml @@ -0,0 +1,40 @@ +--- +- name: mysql + pretty_name: MySQL + sample_repo: "" + category: database + description: >- + Provides a MySQL APP_VERSION database on DISTRO_NAME. For more information + about using this database image, including OpenShift considerations, see + https://github.com/sclorg/mysql-container/blob/master/APP_VERSION/README.md. + imagestream_files: + - filename: mysql-centos.json + latest: "8.0-el9" + distros: + - name: CentOS Stream 9 + app_versions: ["8.0"] + + - filename: mysql-rhel.json + latest: "8.0-el9" + distros: + - name: RHEL 7 + app_versions: ["8.0"] + + - name: RHEL 8 + app_versions: ["8.0"] + + - name: RHEL 9 + app_versions: ["8.0"] + custom_tags: + - name: "8.0" + distro: RHEL 7 + app_version: "8.0" + + - filename: mysql-rhel-aarch64.json + latest: "8.0-el9" + distros: + - name: RHEL 8 + app_versions: ["8.0"] + + - name: RHEL 9 + app_versions: ["8.0"] diff --git a/imagestreams/mysql-centos.json b/imagestreams/mysql-centos.json index 0219f2e..b40a837 100644 --- a/imagestreams/mysql-centos.json +++ b/imagestreams/mysql-centos.json @@ -9,49 +9,14 @@ }, "spec": { "tags": [ - { - "name": "latest", - "annotations": { - "openshift.io/display-name": "MySQL (Latest)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major version updates.", - "iconClass": "icon-mysql-database", - "tags": "mysql" - }, - "from": { - "kind": "ImageStreamTag", - "name": "8.0-el9" - }, - "referencePolicy": { - "type": "Local" - } - }, - { - "name": "8.0-fc", - "annotations": { - "openshift.io/display-name": "MySQL 8.0 (Fedora)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on Fedora. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql", - "version": "8.0" - }, - "from": { - "kind": "DockerImage", - "name": "quay.io/fedora/mysql-80:latest" - }, - "referencePolicy": { - "type": "Local" - } - }, { "name": "8.0-el9", "annotations": { - "openshift.io/display-name": "MySQL 8.0 (CentOS 9 Stream)", + "openshift.io/display-name": "MySQL 8.0 (CentOS Stream 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on CentOS 9 Stream. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql", + "description": "Provides a MySQL 8.0 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/README.md.", + "iconClass": "icon-mysql", + "tags": "database,mysql", "version": "8.0" }, "from": { @@ -63,36 +28,18 @@ } }, { - "name": "8.0-el7", - "annotations": { - "openshift.io/display-name": "MySQL 8.0 (CentOS 7)", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql", - "version": "8.0" - }, - "from": { - "kind": "DockerImage", - "name": "quay.io/centos7/mysql-80-centos7:latest" - }, - "referencePolicy": { - "type": "Local" - } - }, - { - "name": "8.0-el9", + "name": "latest", "annotations": { - "openshift.io/display-name": "MySQL 8.0", + "openshift.io/display-name": "MySQL 8.0 (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on CentOS 9 Stream. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql,hidden", + "description": "Provides a MySQL 8.0 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-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", + "iconClass": "icon-mysql", + "tags": "database,mysql", "version": "8.0" }, "from": { - "kind": "DockerImage", - "name": "quay.io/sclorg/mysql-80-c9s:latest" + "kind": "ImageStreamTag", + "name": "8.0-el9" }, "referencePolicy": { "type": "Local" diff --git a/imagestreams/mysql-rhel-aarch64.json b/imagestreams/mysql-rhel-aarch64.json index c4cee7e..fcb8c07 100644 --- a/imagestreams/mysql-rhel-aarch64.json +++ b/imagestreams/mysql-rhel-aarch64.json @@ -10,17 +10,18 @@ "spec": { "tags": [ { - "name": "latest", + "name": "8.0-el8", "annotations": { - "openshift.io/display-name": "MySQL (Latest)", + "openshift.io/display-name": "MySQL 8.0 (RHEL 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL database on RHEL. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major version updates.", - "iconClass": "icon-mysql-database", - "tags": "mysql" + "description": "Provides a MySQL 8.0 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/README.md.", + "iconClass": "icon-mysql", + "tags": "database,mysql", + "version": "8.0" }, "from": { - "kind": "ImageStreamTag", - "name": "8.0-el8" + "kind": "DockerImage", + "name": "registry.redhat.io/rhel8/mysql-80:latest" }, "referencePolicy": { "type": "Local" @@ -31,9 +32,9 @@ "annotations": { "openshift.io/display-name": "MySQL 8.0 (RHEL 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql", + "description": "Provides a MySQL 8.0 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/README.md.", + "iconClass": "icon-mysql", + "tags": "database,mysql", "version": "8.0" }, "from": { @@ -45,18 +46,18 @@ } }, { - "name": "8.0-el8", + "name": "latest", "annotations": { - "openshift.io/display-name": "MySQL 8.0 (RHEL 8)", + "openshift.io/display-name": "MySQL 8.0 (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql", + "description": "Provides a MySQL 8.0 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-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", + "iconClass": "icon-mysql", + "tags": "database,mysql", "version": "8.0" }, "from": { - "kind": "DockerImage", - "name": "registry.redhat.io/rhel8/mysql-80:latest" + "kind": "ImageStreamTag", + "name": "8.0-el9" }, "referencePolicy": { "type": "Local" diff --git a/imagestreams/mysql-rhel.json b/imagestreams/mysql-rhel.json index e81b33b..1686283 100644 --- a/imagestreams/mysql-rhel.json +++ b/imagestreams/mysql-rhel.json @@ -10,66 +10,67 @@ "spec": { "tags": [ { - "name": "latest", + "name": "8.0-el7", "annotations": { - "openshift.io/display-name": "MySQL (Latest)", + "openshift.io/display-name": "MySQL 8.0 (RHEL 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL database on RHEL. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major version updates.", - "iconClass": "icon-mysql-database", - "tags": "mysql" + "description": "Provides a MySQL 8.0 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/README.md.", + "iconClass": "icon-mysql", + "tags": "database,mysql", + "version": "8.0" }, "from": { - "kind": "ImageStreamTag", - "name": "8.0-el8" + "kind": "DockerImage", + "name": "registry.redhat.io/rhscl/mysql-80-rhel7:latest" }, "referencePolicy": { "type": "Local" } }, { - "name": "8.0-el9", + "name": "8.0-el8", "annotations": { - "openshift.io/display-name": "MySQL 8.0 (RHEL 9)", + "openshift.io/display-name": "MySQL 8.0 (RHEL 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql", + "description": "Provides a MySQL 8.0 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/README.md.", + "iconClass": "icon-mysql", + "tags": "database,mysql", "version": "8.0" }, "from": { "kind": "DockerImage", - "name": "registry.redhat.io/rhel9/mysql-80:latest" + "name": "registry.redhat.io/rhel8/mysql-80:latest" }, "referencePolicy": { "type": "Local" } }, { - "name": "8.0-el8", + "name": "8.0-el9", "annotations": { - "openshift.io/display-name": "MySQL 8.0 (RHEL 8)", + "openshift.io/display-name": "MySQL 8.0 (RHEL 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql", + "description": "Provides a MySQL 8.0 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/README.md.", + "iconClass": "icon-mysql", + "tags": "database,mysql", "version": "8.0" }, "from": { "kind": "DockerImage", - "name": "registry.redhat.io/rhel8/mysql-80:latest" + "name": "registry.redhat.io/rhel9/mysql-80:latest" }, "referencePolicy": { "type": "Local" } }, { - "name": "8.0-el7", + "name": "8.0", "annotations": { "openshift.io/display-name": "MySQL 8.0 (RHEL 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql", + "description": "Provides a MySQL 8.0 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/README.md.", + "iconClass": "icon-mysql", + "tags": "database,mysql", "version": "8.0" }, "from": { @@ -81,18 +82,18 @@ } }, { - "name": "8.0", + "name": "latest", "annotations": { - "openshift.io/display-name": "MySQL 8.0", + "openshift.io/display-name": "MySQL 8.0 (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Provides a MySQL 8.0 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "tags": "mysql,hidden", + "description": "Provides a MySQL 8.0 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-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", + "iconClass": "icon-mysql", + "tags": "database,mysql", "version": "8.0" }, "from": { - "kind": "DockerImage", - "name": "registry.redhat.io/rhscl/mysql-80-rhel7:latest" + "kind": "ImageStreamTag", + "name": "8.0-el9" }, "referencePolicy": { "type": "Local"