Skip to content

Commit

Permalink
Add imagestream generator and YAML config for this generator (#371)
Browse files Browse the repository at this point in the history
* Add imagestream generator and YAML config for this generator
* Add nonstandard tag that refers to RHEL7


Signed-off-by: Petr "Stone" Hracek <[email protected]>
  • Loading branch information
phracek authored Jun 18, 2024
1 parent 5659a98 commit 6915a20
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 117 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/openshift-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
40 changes: 40 additions & 0 deletions imagestreams/imagestreams.yaml
Original file line number Diff line number Diff line change
@@ -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"]
75 changes: 11 additions & 64 deletions imagestreams/mysql-centos.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
Expand Down
35 changes: 18 additions & 17 deletions imagestreams/mysql-rhel-aarch64.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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": {
Expand All @@ -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"
Expand Down
61 changes: 31 additions & 30 deletions imagestreams/mysql-rhel.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
Expand Down

0 comments on commit 6915a20

Please sign in to comment.