-
Notifications
You must be signed in to change notification settings - Fork 66
311 lines (306 loc) · 10.7 KB
/
workflow-integration-tests.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
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
name: Workflow Integration Tests
on:
workflow_dispatch:
inputs:
version:
description: "Select the Cassandra or DSE version to run tests against"
required: true
default: "4.0"
type: choice
options:
- "3.11"
- "4.0"
- "6.8"
- "ALL"
jobs:
build_docker_images:
name: Build Docker Images
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
file: Dockerfile
context: .
push: false
tags: k8ssandra/cass-operator:v${{ steps.vars.outputs.version }}
platforms: linux/amd64
outputs: type=docker,dest=/tmp/k8ssandra-cass-operator.tar
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Build and push
uses: docker/build-push-action@v6
with:
file: logger.Dockerfile
push: false
tags: k8ssandra/system-logger:v${{ steps.vars.outputs.version }}
outputs: type=docker,dest=/tmp/k8ssandra-system-logger.tar
platforms: linux/amd64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Upload cass-operator image
uses: actions/upload-artifact@v4
with:
name: cass-operator
path: /tmp/k8ssandra-cass-operator.tar
- name: Upload system-logger image
uses: actions/upload-artifact@v4
with:
name: system-logger
path: /tmp/k8ssandra-system-logger.tar
kind_311_tests:
if: ${{ inputs.version == '3.11' || inputs.version == 'ALL' }}
needs: build_docker_images
strategy:
matrix:
version:
- "3.11.14"
integration_test:
- cdc_successful
- additional_seeds
- scale_down_unbalanced_racks
- rolling_restart
- decommission_dc
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
M_INTEG_DIR: ${{ matrix.integration_test }}
M_SERVER_VERSION: ${{ matrix.version }}
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
- uses: ./.github/actions/run-integ-test
with:
integration_test: ${{ matrix.integration_test }}
- name: Archive k8s logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: k8s-logs-${{ matrix.integration_test }}
path: ./build/kubectl_dump
kind_40_tests:
if: ${{ inputs.version == '4.0' || inputs.version == 'ALL' }}
needs: build_docker_images
strategy:
matrix:
version:
- "4.0.12"
integration_test:
- canary_upgrade
- config_fql
- cdc_successful
- rolling_restart
- decommission_dc
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
M_INTEG_DIR: ${{ matrix.integration_test }}
M_SERVER_VERSION: ${{ matrix.version }}
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
- uses: ./.github/actions/run-integ-test
with:
integration_test: ${{ matrix.integration_test }}
- name: Archive k8s logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: k8s-logs-${{ matrix.integration_test }}-${{ matrix.version }}
path: ./build/kubectl_dump
kind_dse_tests:
if: ${{ inputs.version == '6.8' || inputs.version == 'ALL' }}
needs: build_docker_images
strategy:
matrix:
version:
- "6.8.46"
integration_test:
#- delete_node_lost_readiness #TODO: fix in https://github.com/k8ssandra/cass-operator/issues/459
- additional_seeds
include:
- version: "6.8.46"
serverImage: datastax/dse-mgmtapi-6_8:6.8.46-ubi8 # DSE 6.8.46
serverType: dse
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
M_INTEG_DIR: ${{ matrix.integration_test }}
M_SERVER_VERSION: ${{ matrix.version }}
M_SERVER_TYPE: dse
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
- uses: ./.github/actions/run-integ-test
with:
integration_test: ${{ matrix.integration_test }}
- name: Archive k8s logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: k8s-logs-${{ matrix.integration_test }}-dse-${{ matrix.version }}
path: ./build/kubectl_dump
kind_int_tests:
needs: build_docker_images
strategy:
matrix:
version:
- "3.11.17"
- "4.0.12"
- "6.8.46"
integration_test:
# Single worker tests:
- additional_serviceoptions
- additional_volumes
# - delete_node_terminated_container # This does not test any operator behavior
- podspec_simple
# - smoke_test_dse # Converted to test_all_the_things, see below job
# - terminate # test_all_things
# - timeout_prestop_termination # This is testing a Kubernetes behavior, not interesting to us
# - upgrade_operator # See kind_311_tests job
- webhook_validation
# Three worker tests:
# - canary_upgrade # See kind_40_tests job
# - config_change_condition # config_change takes care of the same testing
# - cdc_successful # CDC is OSS only , see kind_311_tests and kind_40_tests jobs
# - delete_node_lost_readiness # DSE specific behavior see kind_dse_tests job
- host_network
- internode-encryption-generated
#- no_infinite_reconcile # smoke_test_* should take care of this
- node_replace
- nodeport_service
- rolling_restart
# - stop_resume
- superuser-secret-generated
- superuser-secret-provided
- test_bad_config_and_fix
- test_mtls_mgmt_api
# More than 3 workers tests:
- add_racks
#- additional_seeds #TODO: Fails against C* 4.0, fix in https://github.com/k8ssandra/cass-operator/issues/459
- cluster_wide_install
- config_change
- config_secret
- upgrade_operator # Unnecessary to run against multiple versions
#- multi_cluster_management # cluster_wide_install verifies the same thing
#- oss_test_all_the_things # This is now the smoke test, see kind_smoke_tests job
- scale_down
# - scale_down_not_enough_space # Not enough stable test
#- scale_down_unbalanced_racks #TODO: Fails against C* 4.0 and DSE, fix in https://github.com/k8ssandra/cass-operator/issues/459
- scale_up
- scale_up_stop_resume
- seed_selection
# - config_fql # OSS only, see above job
#- decommission_dc #TODO: Fails against DSE, fix in https://github.com/k8ssandra/cass-operator/issues/459
# - stop_resume_scale_up # Odd insufficient CPU issues in kind+GHA
workflowVersion:
- ${{ inputs.version }}
exclude:
- version: "3.11.17"
workflowVersion: "4.0"
- version: "3.11.17"
workflowVersion: "6.8"
- version: "4.0.12"
workflowVersion: "3.11"
- version: "4.0.12"
workflowVersion: "6.8"
- version: "6.8.46"
workflowVersion: "3.11"
- version: "6.8.46"
workflowVersion: "4.0"
# let other tests continue to run
# even if one fails
fail-fast: false
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
M_INTEG_DIR: ${{ matrix.integration_test }}
M_SERVER_VERSION: ${{ matrix.version }}
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
- name: set environment for DSE
if: ${{ startsWith( matrix.version, '6.8' ) }}
run: |
echo "M_SERVER_IMAGE=datastax/dse-mgmtapi-6_8:6.8.46-ubi8" >> $GITHUB_ENV
echo "M_SERVER_TYPE=dse" >> $GITHUB_ENV
- uses: ./.github/actions/run-integ-test
with:
integration_test: ${{ matrix.integration_test }}
- name: Archive k8s logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: k8s-logs-${{ matrix.integration_test }}-${{ matrix.version }}
path: ./build/kubectl_dump
kind_smoke_tests:
needs: build_docker_images
strategy:
matrix:
version:
- "3.11.17"
- "4.0.12"
- "6.8.46"
workflowVersion:
- ${{ inputs.version }}
exclude:
- version: "3.11.17"
workflowVersion: "4.0"
- version: "3.11.17"
workflowVersion: "6.8"
- version: "4.0.12"
workflowVersion: "3.11"
- version: "4.0.12"
workflowVersion: "6.8"
- version: "6.8.46"
workflowVersion: "3.11"
- version: "6.8.46"
workflowVersion: "4.0"
fail-fast: true
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
M_INTEG_DIR: test_all_the_things
M_SERVER_VERSION: ${{ matrix.version }}
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
if: github.event_name != 'pull_request'
- name: set environment for DSE
if: ${{ startsWith( matrix.version, '6.8' ) }}
run: |
echo "M_SERVER_IMAGE=datastax/dse-mgmtapi-6_8:6.8.46-ubi8" >> $GITHUB_ENV
echo "M_SERVER_TYPE=dse" >> $GITHUB_ENV
- uses: ./.github/actions/run-integ-test
with:
integration_test: test_all_the_things
- name: Archive k8s logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: k8s-logs-smoke_test-${{ matrix.version }}
path: ./build/kubectl_dump