-
Notifications
You must be signed in to change notification settings - Fork 40
312 lines (282 loc) · 13.2 KB
/
k8s-ci.yml
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
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
name: Regression tests CI
on:
push:
branches:
- main
jobs:
k8s-tier1:
runs-on: ubuntu-latest
strategy:
matrix:
kubernetes_version: [v1.19.14]
steps:
- name: Checkout tackle
uses: actions/checkout@v2
with:
repository: konveyor/tackle
path: tackle
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: v1.22.0
kubernetes version: ${{ matrix.kubernetes_version }}
start args: "--addons=registry --addons=ingress"
- name: Validate Minikube
run: minikube status | grep Running
- name: Validate Cluster
run: kubectl get nodes
- name: Validate enabled addon in arg
run: minikube addons list -o json | jq '.registry.Status' | grep enabled
- name: Kubectl enable addons ingress
run: minikube addons enable ingress
- name: Kubectl enable addons registry
run: minikube addons enable registry
- name: Validate Minikube
run: minikube status | grep Running
- name: Validate enabled addon in arg
run: minikube addons list -o json | jq '.registry.Status' | grep enabled
- name: Validate Cluster
run: kubectl get nodes
- name: Kubectl enable addons
run: minikube addons enable dashboard
- name: Kubectl enable olm
run: minikube addons enable olm
- name: Deploy CRD
run: kubectl apply -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/crds.yaml
- name: Deploy OLM
run: kubectl apply -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml
- name: Deploy k8s
run: kubectl apply -f https://raw.githubusercontent.com/konveyor/tackle2-operator/main/tackle-k8s.yaml
- name: Sleep
run: sleep 150s
shell: bash
- name: Create CRD
run: kubectl apply -f https://raw.githubusercontent.com/sshveta/tackle-ui-tests/test_prt/.github/install_tackle2_crd.yaml
- name: Wait for pods to be ready.
run: sleep 150s
shell: bash
- name: Check pod status
run: kubectl get pods -n konveyor-tackle
- name: Verify hub
run: kubectl wait deployment/tackle-hub --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify keycloack-controls
run: kubectl wait deployment/tackle-keycloak-postgresql --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-keycloack-sso
run: kubectl wait deployment/tackle-keycloak-sso --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-operator
run: kubectl wait deployment/tackle-operator --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify pathfinder
run: kubectl wait deployment/tackle-pathfinder --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-pathfinder-postgresql
run: kubectl wait deployment/tackle-pathfinder-postgresql --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-ui
run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n konveyor-tackle
- name: Wait for Ingress
shell: bash
run: |
bash -c 'external_ip="";
echo $external_ip;
while [[ -z $external_ip ]]
do
echo "Waiting for end point..."
external_ip=$(kubectl get ingress tackle --template="{{range.status.loadBalancer.ingress}}{{.ip}}{{end}}" -n konveyor-tackle);[[ -z $external_ip ]] &&
echo $external_ip;
sleep 10;
done
echo "End point ready:" &&
echo $external_ip;
export endpoint=$(minikube ip);
echo "CYPRESS_tackleUrl=https://$endpoint" >>$GITHUB_ENV'
- name: Checkout to branch
uses: actions/checkout@v2
- name: Install NPM
run: npm install .
- name: Run cypress login test
run: npx cypress run --spec "cypress/e2e/tests/login.test.ts" --env user="admin",pass="password",tackleUrl=${{ env.CYPRESS_tackleUrl }}
- name: Run Tier1 test cases
run: |
npx cypress run --spec **/*.test.ts --env grepTags=@tier1,user=admin,pass=Dog8code,tackleUrl=${{ env.CYPRESS_tackleUrl }}
k8s-tier2:
runs-on: ubuntu-latest
strategy:
matrix:
kubernetes_version: [v1.20.10]
steps:
- name: Checkout tackle
uses: actions/checkout@v2
with:
repository: konveyor/tackle
path: tackle
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: v1.22.0
kubernetes version: ${{ matrix.kubernetes_version }}
start args: "--addons=registry --addons=ingress"
- name: Validate Minikube
run: minikube status | grep Running
- name: Validate Cluster
run: kubectl get nodes
- name: Validate enabled addon in arg
run: minikube addons list -o json | jq '.registry.Status' | grep enabled
- name: Kubectl enable addons ingress
run: minikube addons enable ingress
- name: Kubectl enable addons registry
run: minikube addons enable registry
- name: Validate Minikube
run: minikube status | grep Running
- name: Validate enabled addon in arg
run: minikube addons list -o json | jq '.registry.Status' | grep enabled
- name: Validate Cluster
run: kubectl get nodes
- name: Kubectl enable addons
run: minikube addons enable dashboard
- name: Kubectl enable olm
run: minikube addons enable olm
- name: Deploy CRD
run: kubectl apply -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/crds.yaml
- name: Deploy OLM
run: kubectl apply -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml
- name: Deploy k8s
run: kubectl apply -f https://raw.githubusercontent.com/konveyor/tackle2-operator/main/tackle-k8s.yaml
- name: Sleep
run: sleep 150s
shell: bash
- name: Create CRD
run: kubectl apply -f https://raw.githubusercontent.com/sshveta/tackle-ui-tests/test_prt/.github/install_tackle2_crd.yaml
- name: Wait for pods to be ready.
run: sleep 150s
shell: bash
- name: Check pod status
run: kubectl get pods -n konveyor-tackle
- name: Verify hub
run: kubectl wait deployment/tackle-hub --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify keycloack-controls
run: kubectl wait deployment/tackle-keycloak-postgresql --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-keycloack-sso
run: kubectl wait deployment/tackle-keycloak-sso --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-operator
run: kubectl wait deployment/tackle-operator --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify pathfinder
run: kubectl wait deployment/tackle-pathfinder --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-pathfinder-postgresql
run: kubectl wait deployment/tackle-pathfinder-postgresql --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-ui
run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n konveyor-tackle
- name: Wait for Ingress
shell: bash
run: |
bash -c 'external_ip="";
echo $external_ip;
while [[ -z $external_ip ]]
do
echo "Waiting for end point..."
external_ip=$(kubectl get ingress tackle --template="{{range.status.loadBalancer.ingress}}{{.ip}}{{end}}" -n konveyor-tackle);[[ -z $external_ip ]] &&
echo $external_ip;
sleep 10;
done
echo "End point ready:" &&
echo $external_ip;
export endpoint=$(minikube ip);
echo "CYPRESS_tackleUrl=https://$endpoint" >>$GITHUB_ENV'
- name: Checkout to branch
uses: actions/checkout@v2
- name: Install NPM
run: npm install .
- name: Run cypress login test
run: npx cypress run --spec "cypress/e2e/tests/login.test.ts" --env user="admin",pass="password",tackleUrl=${{ env.CYPRESS_tackleUrl }}
- name: Run Tier2 test cases
run: |
npx cypress run --spec **/*.test.ts --env grepTags=@tier2,user=admin,pass=Dog8code,tackleUrl=${{ env.CYPRESS_tackleUrl }}
k8s-tier3:
runs-on: ubuntu-latest
strategy:
matrix:
kubernetes_version: [v1.21.4]
steps:
- name: Checkout tackle
uses: actions/checkout@v2
with:
repository: konveyor/tackle
path: tackle
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: v1.22.0
kubernetes version: ${{ matrix.kubernetes_version }}
start args: "--addons=registry --addons=ingress"
- name: Validate Minikube
run: minikube status | grep Running
- name: Validate Cluster
run: kubectl get nodes
- name: Validate enabled addon in arg
run: minikube addons list -o json | jq '.registry.Status' | grep enabled
- name: Kubectl enable addons ingress
run: minikube addons enable ingress
- name: Kubectl enable addons registry
run: minikube addons enable registry
- name: Validate Minikube
run: minikube status | grep Running
- name: Validate enabled addon in arg
run: minikube addons list -o json | jq '.registry.Status' | grep enabled
- name: Validate Cluster
run: kubectl get nodes
- name: Kubectl enable addons
run: minikube addons enable dashboard
- name: Kubectl enable olm
run: minikube addons enable olm
- name: Deploy CRD
run: kubectl apply -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/crds.yaml
- name: Deploy OLM
run: kubectl apply -f https://raw.githubusercontent.com/operator-framework/operator-lifecycle-manager/master/deploy/upstream/quickstart/olm.yaml
- name: Deploy k8s
run: kubectl apply -f https://raw.githubusercontent.com/konveyor/tackle2-operator/main/tackle-k8s.yaml
- name: Sleep
run: sleep 150s
shell: bash
- name: Create CRD
run: kubectl apply -f https://raw.githubusercontent.com/sshveta/tackle-ui-tests/test_prt/.github/install_tackle2_crd.yaml
- name: Wait for pods to be ready.
run: sleep 150s
shell: bash
- name: Check pod status
run: kubectl get pods -n konveyor-tackle
- name: Verify hub
run: kubectl wait deployment/tackle-hub --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify keycloack-controls
run: kubectl wait deployment/tackle-keycloak-postgresql --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-keycloack-sso
run: kubectl wait deployment/tackle-keycloak-sso --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-operator
run: kubectl wait deployment/tackle-operator --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify pathfinder
run: kubectl wait deployment/tackle-pathfinder --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-pathfinder-postgresql
run: kubectl wait deployment/tackle-pathfinder-postgresql --for condition=available --timeout=-1s -n konveyor-tackle
- name: Verify tackle-ui
run: kubectl wait deployment/tackle-ui --for condition=available --timeout=-1s -n konveyor-tackle
- name: Wait for Ingress
shell: bash
run: |
bash -c 'external_ip="";
echo $external_ip;
while [[ -z $external_ip ]]
do
echo "Waiting for end point..."
external_ip=$(kubectl get ingress tackle --template="{{range.status.loadBalancer.ingress}}{{.ip}}{{end}}" -n konveyor-tackle);[[ -z $external_ip ]] &&
echo $external_ip;
sleep 10;
done
echo "End point ready:" &&
echo $external_ip;
export endpoint=$(minikube ip);
echo "CYPRESS_tackleUrl=https://$endpoint" >>$GITHUB_ENV'
- name: Checkout to branch
uses: actions/checkout@v2
- name: Install NPM
run: npm install .
- name: Run cypress login test
run: npx cypress run --spec "cypress/e2e/tests/login.test.ts" --env user="admin",pass="password",tackleUrl=${{ env.CYPRESS_tackleUrl }}
- name: Run Tier3 test cases
run: |
npx cypress run --spec **/*.test.ts --env grepTags=@tier3,user=admin,pass=Dog8code,tackleUrl=${{ env.CYPRESS_tackleUrl }}