Skip to content

Commit

Permalink
Imagestream generator (#232)
Browse files Browse the repository at this point in the history
* add YAML conf for imagestream generator

* add github action for checking imagestreams

* add files generated by imagestreams generator
  • Loading branch information
zmiklank authored Apr 4, 2024
1 parent e87c365 commit 8f5d90b
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 200 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
39 changes: 39 additions & 0 deletions imagestreams/imagestreams.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
- name: mariadb
pretty_name: MariaDB
sample_repo: https://github.com/sclorg/httpd-ex.git
category: database
description: >-
Provides a MariaDB APP_VERSION database on DISTRO_NAME. For more information
about using this database image, including OpenShift considerations, see
https://github.com/sclorg/mariadb-container/tree/master/APP_VERSION/README.md.
imagestream_files:
- filename: mariadb-centos.json
latest: "10.5-el9"
distros:
- name: CentOS Stream 8
app_versions: ["10.3", "10.5"]

- name: CentOS Stream 9
app_versions: ["10.5"]

- filename: mariadb-rhel.json
latest: "10.5-el8"
distros:
- name: RHEL 7
app_versions: ["10.3", "10.5"]

- name: RHEL 8
app_versions: ["10.3", "10.5"]

- name: RHEL 9
app_versions: ["10.5"]

- filename: mariadb-rhel-aarch64.json
latest: "10.5-el8"
distros:
- name: RHEL 8
app_versions: ["10.3", "10.5"]

- name: RHEL 9
app_versions: ["10.5"]
147 changes: 22 additions & 125 deletions imagestreams/mariadb-centos.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,19 @@
"spec": {
"tags": [
{
"name": "latest",
"annotations": {
"openshift.io/display-name": "MariaDB (Latest)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major version updates.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb"
},
"from": {
"kind": "ImageStreamTag",
"name": "10.5-el9"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "10.5-fc",
"annotations": {
"openshift.io/display-name": "MariaDB 10.5 (Fedora)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.5 database on Fedora. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.5"
},
"from": {
"kind": "DockerImage",
"name": "quay.io/fedora/mariadb-105:latest"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "10.5-el9",
"name": "10.3-el8",
"annotations": {
"openshift.io/display-name": "MariaDB 10.5 (CentOS 9 Stream)",
"openshift.io/display-name": "MariaDB 10.3 (CentOS Stream 8)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.5 database on CentOS 9 Stream. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"description": "Provides a MariaDB 10.3 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.5"
"version": "10.3",
"sampleRepo": "https://github.com/sclorg/httpd-ex.git"
},
"from": {
"kind": "DockerImage",
"name": "quay.io/sclorg/mariadb-105-c9s:latest"
"name": "quay.io/sclorg/mariadb-103-c8s:latest"
},
"referencePolicy": {
"type": "Local"
Expand All @@ -65,12 +31,13 @@
{
"name": "10.5-el8",
"annotations": {
"openshift.io/display-name": "MariaDB 10.5 (CentOS 8 Stream)",
"openshift.io/display-name": "MariaDB 10.5 (CentOS Stream 8)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.5 database on CentOS 8 Stream. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"description": "Provides a MariaDB 10.5 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.5"
"version": "10.5",
"sampleRepo": "https://github.com/sclorg/httpd-ex.git"
},
"from": {
"kind": "DockerImage",
Expand All @@ -81,32 +48,15 @@
}
},
{
"name": "10.5-el7",
"annotations": {
"openshift.io/display-name": "MariaDB 10.5 (CentOS 7)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.5"
},
"from": {
"kind": "DockerImage",
"name": "quay.io/centos7/mariadb-105-centos7:latest"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "10.5",
"name": "10.5-el9",
"annotations": {
"openshift.io/display-name": "MariaDB 10.5",
"openshift.io/display-name": "MariaDB 10.5 (CentOS Stream 9)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.5 database on CentOS 9 Stream. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"description": "Provides a MariaDB 10.5 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.5"
"version": "10.5",
"sampleRepo": "https://github.com/sclorg/httpd-ex.git"
},
"from": {
"kind": "DockerImage",
Expand All @@ -117,72 +67,19 @@
}
},
{
"name": "10.3-fc",
"annotations": {
"openshift.io/display-name": "MariaDB 10.3 (Fedora)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.5 database on Fedora. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.3"
},
"from": {
"kind": "DockerImage",
"name": "quay.io/fedora/mariadb-103:latest"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "10.3-el8",
"annotations": {
"openshift.io/display-name": "MariaDB 10.3 (CentOS 8 Stream)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.5 database on CentOS 8 Stream. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.3"
},
"from": {
"kind": "DockerImage",
"name": "quay.io/sclorg/mariadb-103-c8s:latest"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "10.3-el7",
"name": "latest",
"annotations": {
"openshift.io/display-name": "MariaDB 10.3 (CentOS 7)",
"openshift.io/display-name": "MariaDB 10.5 (Latest)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.3 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"description": "Provides a MariaDB 10.5 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/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-mariadb",
"tags": "database,mariadb",
"version": "10.3"
},
"from": {
"kind": "DockerImage",
"name": "quay.io/centos7/mariadb-103-centos7:latest"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "10.3",
"annotations": {
"openshift.io/display-name": "MariaDB 10.3",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.3 database on CentOS 8 Stream. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb,hidden",
"version": "10.3"
"version": "10.5",
"sampleRepo": "https://github.com/sclorg/httpd-ex.git"
},
"from": {
"kind": "DockerImage",
"name": "quay.io/sclorg/mariadb-103-c8s:latest"
"kind": "ImageStreamTag",
"name": "10.5-el9"
},
"referencePolicy": {
"type": "Local"
Expand Down
45 changes: 25 additions & 20 deletions imagestreams/mariadb-rhel-aarch64.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,6 @@
},
"spec": {
"tags": [
{
"name": "latest",
"annotations": {
"openshift.io/display-name": "MariaDB (Latest)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB database on RHEL. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major version updates.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb"
},
"from": {
"kind": "ImageStreamTag",
"name": "10.5-el8"
},
"referencePolicy": {
"type": "Local"
}
},
{
"name": "10.3-el8",
"annotations": {
Expand All @@ -34,7 +17,8 @@
"description": "Provides a MariaDB 10.3 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.3"
"version": "10.3",
"sampleRepo": "https://github.com/sclorg/httpd-ex.git"
},
"from": {
"kind": "DockerImage",
Expand All @@ -52,7 +36,8 @@
"description": "Provides a MariaDB 10.5 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.5"
"version": "10.5",
"sampleRepo": "https://github.com/sclorg/httpd-ex.git"
},
"from": {
"kind": "DockerImage",
Expand All @@ -70,7 +55,8 @@
"description": "Provides a MariaDB 10.5 database on RHEL 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.",
"iconClass": "icon-mariadb",
"tags": "database,mariadb",
"version": "10.5"
"version": "10.5",
"sampleRepo": "https://github.com/sclorg/httpd-ex.git"
},
"from": {
"kind": "DockerImage",
Expand All @@ -79,6 +65,25 @@
"referencePolicy": {
"type": "Local"
}
},
{
"name": "latest",
"annotations": {
"openshift.io/display-name": "MariaDB 10.5 (Latest)",
"openshift.io/provider-display-name": "Red Hat, Inc.",
"description": "Provides a MariaDB 10.5 database on RHEL 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/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-mariadb",
"tags": "database,mariadb",
"version": "10.5",
"sampleRepo": "https://github.com/sclorg/httpd-ex.git"
},
"from": {
"kind": "ImageStreamTag",
"name": "10.5-el8"
},
"referencePolicy": {
"type": "Local"
}
}
]
}
Expand Down
Loading

0 comments on commit 8f5d90b

Please sign in to comment.