-
Notifications
You must be signed in to change notification settings - Fork 16
273 lines (273 loc) · 18.1 KB
/
release-generate-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
name: Generate CI config
on:
pull_request:
branches:
- '**'
push:
branches:
- 'main'
schedule:
- cron: "0 6 * * *" # Daily at 06:00.
workflow_dispatch: # Manual workflow trigger
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
generate-ci:
name: generate-ci
runs-on: ubuntu-latest
env:
GOPATH: ${{ github.workspace }}
steps:
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[backstage-plugins] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/backstage-plugins
repository: openshift-knative/backstage-plugins
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing-hyperfoil-benchmark] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/eventing-hyperfoil-benchmark
repository: openshift-knative/eventing-hyperfoil-benchmark
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing-istio] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/eventing-istio
repository: openshift-knative/eventing-istio
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing-kafka-broker] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/eventing-kafka-broker
repository: openshift-knative/eventing-kafka-broker
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/eventing
repository: openshift-knative/eventing
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[serverless-operator] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/serverless-operator
repository: openshift-knative/serverless-operator
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[net-istio] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/net-istio
repository: openshift-knative/net-istio
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[net-kourier] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/net-kourier
repository: openshift-knative/net-kourier
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[serving] Clone repository'
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack/openshift-knative/serving
repository: openshift-knative/serving
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- name: Install prerequisites
env:
YQ_VERSION: 3.4.0
run: |
sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
sudo mv /usr/bin/yq /usr/local/bin/yq
- name: Checkout openshift-knative/hack
uses: actions/checkout@v4
with:
path: ./src/github.com/openshift-knative/hack
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: ./src/github.com/openshift-knative/hack/go.mod
- name: Install YAML2JSON
run: go install github.com/bronze1man/yaml2json@latest
- name: Convert configurations to JSON
working-directory: ./src/github.com/openshift-knative/hack
run: find config/*.yaml | xargs -I{} sh -c "yaml2json < {} > {}.json"
- name: Checkout openshift/release
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v4
with:
ref: 'master'
repository: 'openshift/release'
path: ./src/github.com/openshift-knative/hack/openshift/release
- name: Checkout openshift/release
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
uses: actions/checkout@v4
with:
ref: 'master'
repository: 'openshift/release'
path: ./src/github.com/openshift-knative/hack/openshift/release
token: ${{ secrets.SERVERLESS_QE_ROBOT }}
- name: Configure Git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "serverless-qe"
- name: Generate CI
working-directory: ./src/github.com/openshift-knative/hack
run: make generate-ci-no-clean ARGS=--branch=master
- name: Create Pull Request - openshift/release
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
run: |
set -x
git remote add fork "https://github.com/serverless-qe/release.git"
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/release.git" sync-serverless-ci:sync-serverless-ci -f
gh pr create --base master --head serverless-qe:sync-serverless-ci --fill-verbose || true
working-directory: ./src/github.com/openshift-knative/hack/openshift/release
- name: Create Pull Request - openshift-knative/hack
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
run: |
set -x
git remote add fork "https://github.com/serverless-qe/hack.git"
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/hack.git" sync-konflux/main:sync-konflux/main -f
gh pr create --base main --head serverless-qe:sync-konflux/main --title "[main] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
# Use the repository cloned by the prowgen tool
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/hack
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing-istio - release-next] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/eventing-istio.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/eventing-istio.git" sync-konflux/release-next:sync-konflux/release-next -f
gh pr create --base main --head serverless-qe:sync-konflux/release-next --title "[main] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/eventing-istio
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing-istio - release-v1.15] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/eventing-istio.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/eventing-istio.git" sync-konflux/release-v1.15:sync-konflux/release-v1.15 -f
gh pr create --base release-v1.15 --head serverless-qe:sync-konflux/release-v1.15 --title "[release-v1.15] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/eventing-istio
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing-kafka-broker - release-next] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/eventing-kafka-broker.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/eventing-kafka-broker.git" sync-konflux/release-next:sync-konflux/release-next -f
gh pr create --base main --head serverless-qe:sync-konflux/release-next --title "[main] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/eventing-kafka-broker
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing-kafka-broker - release-v1.15] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/eventing-kafka-broker.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/eventing-kafka-broker.git" sync-konflux/release-v1.15:sync-konflux/release-v1.15 -f
gh pr create --base release-v1.15 --head serverless-qe:sync-konflux/release-v1.15 --title "[release-v1.15] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/eventing-kafka-broker
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing - release-next] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/eventing.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/eventing.git" sync-konflux/release-next:sync-konflux/release-next -f
gh pr create --base main --head serverless-qe:sync-konflux/release-next --title "[main] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/eventing
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[eventing - release-v1.15] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/eventing.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/eventing.git" sync-konflux/release-v1.15:sync-konflux/release-v1.15 -f
gh pr create --base release-v1.15 --head serverless-qe:sync-konflux/release-v1.15 --title "[release-v1.15] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/eventing
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[serverless-operator - main] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/serverless-operator.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/serverless-operator.git" sync-konflux/main:sync-konflux/main -f
gh pr create --base main --head serverless-qe:sync-konflux/main --title "[main] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/serverless-operator
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[net-istio - release-v1.15] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/net-istio.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/net-istio.git" sync-konflux/release-v1.15:sync-konflux/release-v1.15 -f
gh pr create --base release-v1.15 --head serverless-qe:sync-konflux/release-v1.15 --title "[release-v1.15] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/net-istio
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[net-kourier - release-v1.15] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/net-kourier.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/net-kourier.git" sync-konflux/release-v1.15:sync-konflux/release-v1.15 -f
gh pr create --base release-v1.15 --head serverless-qe:sync-konflux/release-v1.15 --title "[release-v1.15] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/net-kourier
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[serving - release-next] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/serving.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/serving.git" sync-konflux/release-next:sync-konflux/release-next -f
gh pr create --base main --head serverless-qe:sync-konflux/release-next --title "[main] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/serving
- env:
GH_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
GITHUB_TOKEN: ${{ secrets.SERVERLESS_QE_ROBOT }}
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && github.ref_name == 'main' }}
name: '[serving - release-v1.15] Create Konflux PR'
run: |
set -x
git remote add fork "https://github.com/serverless-qe/serving.git" || true # ignore: already exists errors
git push "https://serverless-qe:${GH_TOKEN}@github.com/serverless-qe/serving.git" sync-konflux/release-v1.15:sync-konflux/release-v1.15 -f
gh pr create --base release-v1.15 --head serverless-qe:sync-konflux/release-v1.15 --title "[release-v1.15] Add Konflux configurations" --body "Add Konflux components and pipelines" || true
working-directory: ./src/github.com/openshift-knative/hack/openshift-knative/serving