Skip to content

Commit 3836b38

Browse files
authored
add YAML config for imagestreams generator (#549)
* add github action for checking if imagestreams are properly regenerated * add YAML config for imagestreams generator * add imagestrem files generated by imagestream generator * imagestreams.yaml, use >- for description in yaml Previously used '>' was appending newline at the end of string. * make imagestream check as part of openshift tests
1 parent 1f953fd commit 3836b38

File tree

5 files changed

+201
-186
lines changed

5 files changed

+201
-186
lines changed

.github/workflows/openshift-tests.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,24 @@ on:
33
types:
44
- created
55
jobs:
6-
distgen-check:
7-
name: "Check distgen generated files"
8-
runs-on: ubuntu-20.04
9-
concurrency:
10-
group: ocp-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }}
11-
cancel-in-progress: true
6+
check-imagestreams:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
statuses: write
1211
if: |
1312
github.event.issue.pull_request
1413
&& (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]'))
1514
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
15+
steps:
16+
- uses: sclorg/ci-scripts/ocp-stream-generator@master
17+
with:
18+
ref: "refs/pull/${{ github.event.issue.number }}/head"
19+
20+
distgen-check:
21+
name: "Check distgen generated files"
22+
runs-on: ubuntu-latest
23+
needs: check-imagestreams
1624
steps:
1725
- name: Checkout repo
1826
uses: actions/checkout@v4
@@ -31,20 +39,17 @@ jobs:
3139
3240
openshift-tests:
3341
needs: distgen-check
34-
# This job only runs for '[test-all]' or '[test-openshift] pull request comments by owner, member
3542
name: "${{ matrix.test_case }} tests: ${{ matrix.version }} - ${{ matrix.os_test }}"
36-
runs-on: ubuntu-20.04
43+
runs-on: ubuntu-latest
44+
concurrency:
45+
group: ocp-${{ github.event.issue.number }}-${{ matrix.version }}-${{ matrix.os_test }}
46+
cancel-in-progress: true
3747
strategy:
3848
fail-fast: false
3949
matrix:
4050
version: [ "10", "11", "12", "13", "15", "16" ]
4151
os_test: [ "rhel7", "rhel8", "rhel9"]
4252
test_case: [ "openshift-4" ]
43-
44-
if: |
45-
github.event.issue.pull_request
46-
&& (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]'))
47-
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
4853
steps:
4954
- uses: sclorg/tfaga-wrapper@main
5055
with:

imagestreams/imagestreams.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
- name: postgresql
3+
pretty_name: PostgreSQL
4+
sample_repo: ""
5+
category: database
6+
description: >-
7+
Provides a PostgreSQL APP_VERSION database on DISTRO_NAME.
8+
For more information about using this database image,
9+
including OpenShift considerations,
10+
see https://github.com/sclorg/postgresql-container/blob/master/README.md.
11+
imagestream_files:
12+
- filename: postgresql-centos.json
13+
latest: "15-el9"
14+
distros:
15+
- name: CentOS Stream 8
16+
app_versions: [10, 12, 13, 15, 16]
17+
18+
- name: CentOS Stream 9
19+
app_versions: [13, 15, 16]
20+
21+
- filename: postgresql-rhel.json
22+
latest: "15-el8"
23+
distros:
24+
- name: RHEL 7
25+
app_versions: [10, 12, 13]
26+
27+
- name: RHEL 8
28+
app_versions: [10, 12, 13, 15, 16]
29+
30+
- name: RHEL 9
31+
app_versions: [13, 15, 16]
32+
33+
- filename: postgresql-rhel-aarch64.json
34+
latest: "13-el8"
35+
distros:
36+
- name: RHEL 8
37+
app_versions: [10, 12, 13, 15, 16]
38+
39+
- name: RHEL 9
40+
app_versions: [13, 15, 16]

imagestreams/postgresql-centos.json

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,71 +10,72 @@
1010
"spec": {
1111
"tags": [
1212
{
13-
"name": "latest",
13+
"name": "10-el8",
1414
"annotations": {
15-
"openshift.io/display-name": "PostgreSQL (Latest)",
15+
"openshift.io/display-name": "PostgreSQL 10 (CentOS Stream 8)",
1616
"openshift.io/provider-display-name": "Red Hat, Inc.",
17-
"description": "Provides a PostgreSQL database on CentOS Stream. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major version updates.",
17+
"description": "Provides a PostgreSQL 10 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
1818
"iconClass": "icon-postgresql",
19-
"tags": "database,postgresql"
19+
"tags": "database,postgresql",
20+
"version": "10"
2021
},
2122
"from": {
22-
"kind": "ImageStreamTag",
23-
"name": "15-el9"
23+
"kind": "DockerImage",
24+
"name": "quay.io/sclorg/postgresql-10-c8s:latest"
2425
},
2526
"referencePolicy": {
2627
"type": "Local"
2728
}
2829
},
2930
{
30-
"name": "16-el9",
31+
"name": "12-el8",
3132
"annotations": {
32-
"openshift.io/display-name": "PostgreSQL 16 (CentOS Stream 9)",
33+
"openshift.io/display-name": "PostgreSQL 12 (CentOS Stream 8)",
3334
"openshift.io/provider-display-name": "Red Hat, Inc.",
34-
"description": "Provides a PostgreSQL 16 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
35+
"description": "Provides a PostgreSQL 12 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
3536
"iconClass": "icon-postgresql",
3637
"tags": "database,postgresql",
37-
"version": "16"
38+
"version": "12"
3839
},
3940
"from": {
4041
"kind": "DockerImage",
41-
"name": "quay.io/sclorg/postgresql-16-c9s:latest"
42+
"name": "quay.io/sclorg/postgresql-12-c8s:latest"
4243
},
4344
"referencePolicy": {
4445
"type": "Local"
4546
}
4647
},
4748
{
48-
"name": "15-el9",
49+
"name": "13-el8",
4950
"annotations": {
50-
"openshift.io/display-name": "PostgreSQL 15 (CentOS Stream 9)",
51+
"openshift.io/display-name": "PostgreSQL 13 (CentOS Stream 8)",
5152
"openshift.io/provider-display-name": "Red Hat, Inc.",
52-
"description": "Provides a PostgreSQL 15 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
53+
"description": "Provides a PostgreSQL 13 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
5354
"iconClass": "icon-postgresql",
5455
"tags": "database,postgresql",
55-
"version": "15"
56+
"version": "13"
5657
},
5758
"from": {
5859
"kind": "DockerImage",
59-
"name": "quay.io/sclorg/postgresql-15-c9s:latest"
60+
"name": "quay.io/sclorg/postgresql-13-c8s:latest"
6061
},
6162
"referencePolicy": {
6263
"type": "Local"
6364
}
6465
},
6566
{
66-
"name": "13-el9",
67+
"name": "15-el8",
6768
"annotations": {
68-
"openshift.io/display-name": "PostgreSQL 13 (CentOS Stream 9)",
69+
"openshift.io/display-name": "PostgreSQL 15 (CentOS Stream 8)",
6970
"openshift.io/provider-display-name": "Red Hat, Inc.",
70-
"description": "Provides a PostgreSQL 13 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
71+
"description": "Provides a PostgreSQL 15 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
7172
"iconClass": "icon-postgresql",
7273
"tags": "database,postgresql",
73-
"version": "13"
74+
"version": "15"
7475
},
7576
"from": {
7677
"kind": "DockerImage",
77-
"name": "quay.io/sclorg/postgresql-13-c9s:latest"
78+
"name": "quay.io/sclorg/postgresql-15-c8s:latest"
7879
},
7980
"referencePolicy": {
8081
"type": "Local"
@@ -99,72 +100,72 @@
99100
}
100101
},
101102
{
102-
"name": "15-el8",
103+
"name": "13-el9",
103104
"annotations": {
104-
"openshift.io/display-name": "PostgreSQL 15 (CentOS Stream 8)",
105+
"openshift.io/display-name": "PostgreSQL 13 (CentOS Stream 9)",
105106
"openshift.io/provider-display-name": "Red Hat, Inc.",
106-
"description": "Provides a PostgreSQL 15 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
107+
"description": "Provides a PostgreSQL 13 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
107108
"iconClass": "icon-postgresql",
108109
"tags": "database,postgresql",
109-
"version": "15"
110+
"version": "13"
110111
},
111112
"from": {
112113
"kind": "DockerImage",
113-
"name": "quay.io/sclorg/postgresql-15-c8s:latest"
114+
"name": "quay.io/sclorg/postgresql-13-c9s:latest"
114115
},
115116
"referencePolicy": {
116117
"type": "Local"
117118
}
118119
},
119120
{
120-
"name": "13-el8",
121+
"name": "15-el9",
121122
"annotations": {
122-
"openshift.io/display-name": "PostgreSQL 13 (CentOS Stream 8)",
123+
"openshift.io/display-name": "PostgreSQL 15 (CentOS Stream 9)",
123124
"openshift.io/provider-display-name": "Red Hat, Inc.",
124-
"description": "Provides a PostgreSQL 13 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
125+
"description": "Provides a PostgreSQL 15 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
125126
"iconClass": "icon-postgresql",
126127
"tags": "database,postgresql",
127-
"version": "13"
128+
"version": "15"
128129
},
129130
"from": {
130131
"kind": "DockerImage",
131-
"name": "quay.io/sclorg/postgresql-13-c8s:latest"
132+
"name": "quay.io/sclorg/postgresql-15-c9s:latest"
132133
},
133134
"referencePolicy": {
134135
"type": "Local"
135136
}
136137
},
137138
{
138-
"name": "12-el8",
139+
"name": "16-el9",
139140
"annotations": {
140-
"openshift.io/display-name": "PostgreSQL 12 (CentOS Stream 8)",
141+
"openshift.io/display-name": "PostgreSQL 16 (CentOS Stream 9)",
141142
"openshift.io/provider-display-name": "Red Hat, Inc.",
142-
"description": "Provides a PostgreSQL 12 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
143+
"description": "Provides a PostgreSQL 16 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
143144
"iconClass": "icon-postgresql",
144145
"tags": "database,postgresql",
145-
"version": "12"
146+
"version": "16"
146147
},
147148
"from": {
148149
"kind": "DockerImage",
149-
"name": "quay.io/sclorg/postgresql-12-c8s:latest"
150+
"name": "quay.io/sclorg/postgresql-16-c9s:latest"
150151
},
151152
"referencePolicy": {
152153
"type": "Local"
153154
}
154155
},
155156
{
156-
"name": "10-el8",
157+
"name": "latest",
157158
"annotations": {
158-
"openshift.io/display-name": "PostgreSQL 10 (CentOS Stream 8)",
159+
"openshift.io/display-name": "PostgreSQL 15 (Latest)",
159160
"openshift.io/provider-display-name": "Red Hat, Inc.",
160-
"description": "Provides a PostgreSQL 10 database on CentOS Stream 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
161+
"description": "Provides a PostgreSQL 15 database on CentOS Stream 9. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/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",
161162
"iconClass": "icon-postgresql",
162163
"tags": "database,postgresql",
163-
"version": "10"
164+
"version": "15"
164165
},
165166
"from": {
166-
"kind": "DockerImage",
167-
"name": "quay.io/sclorg/postgresql-10-c8s:latest"
167+
"kind": "ImageStreamTag",
168+
"name": "15-el9"
168169
},
169170
"referencePolicy": {
170171
"type": "Local"

0 commit comments

Comments
 (0)