-
Notifications
You must be signed in to change notification settings - Fork 21
258 lines (245 loc) · 9.1 KB
/
main-integration.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
# This workflow is responsible for all kinds of integration tests that are run after push to main.
# Those tests depend on a container image so in the first job we wait for the image build to succeed.
name: main integration tests
permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkouts
on:
push:
branches:
- main
- 'release-**'
jobs:
filter-changes:
outputs:
check: ${{ steps.changed-files.outputs.any_modified }}
name: List relevant VCS changes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tj-actions/changed-files@e9772d140489982e0e3704fea5ee93d536f1e275
id: changed-files
with:
files_ignore: |
docs/**
**/*.md
tests/performance/**
OWNERS
CODEOWNERS
sec-scanners-config.yaml
.github/**
.**
external-images.yaml
- name: List all changed files
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
build-image:
name: Build manager image
needs: [filter-changes]
if: ${{ github.event.pull_request.draft == false && needs.filter-changes.outputs.check == 'true' }}
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: istio-manager
dockerfile: Dockerfile
context: .
build-args: |
VERSION=${{ github.ref_name }}
tags: "${{ github.sha }}"
build-experimental-image:
name: Build manager image - experimental
needs: [filter-changes]
if: ${{ github.event.pull_request.draft == false && needs.filter-changes.outputs.check == 'true' }}
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: istio-manager
dockerfile: Dockerfile
context: .
build-args: |
VERSION=${{ github.ref_name }}-experimental
GO_BUILD_TAGS=experimental
tags: "${{ github.sha }}-experimental"
istio-upgrade-integration-test:
name: Istio upgrade integration test
runs-on: ubuntu-latest
needs: [ build-image ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./tests/integration/scripts/gardener-kubeconfig.sh
shell: bash
env:
GARDENER_TOKEN: ${{ secrets.GARDENER_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- run: make IMG="europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{github.sha}}" gardener-istio-integration-test
shell: bash
env:
MAKE_TEST_TARGET: "istio-upgrade-integration-test"
TARGET_BRANCH: ${{github.ref_name}}
GARDENER_KUBECONFIG: "/home/runner/work/istio/istio/gardener_kubeconfig.yaml"
GARDENER_PROJECT_NAME: "goats"
GARDENER_PROVIDER_SECRET_NAME: "goat"
GARDENER_PROVIDER: "gcp"
GARDENER_REGION: "europe-west3"
GARDENER_CLUSTER_VERSION: "1.29.7"
MACHINE_TYPE: "n2-standard-4"
DISK_SIZE: 50
DISK_TYPE: "pd-standard"
SCALER_MAX: 20
SCALER_MIN: 3
istio-integration-test:
name: Istio integration test
runs-on: ubuntu-latest
needs: [build-image]
strategy:
fail-fast: false
matrix:
test_make_target: [ "configuration-integration-test", "mesh-communication-integration-test", "installation-integration-test", "observability-integration-test" ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/integration-test
with:
test_make_target: ${{ matrix.test_make_target }}
operator-image-name: "europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{github.sha}}"
servers-memory: "16"
agents: 2
istio-integration-gcp:
name: Istio integration test GCP
runs-on: ubuntu-latest
needs: [build-image]
strategy:
fail-fast: false
matrix:
test_make_target: [ "configuration-integration-test", "mesh-communication-integration-test", "installation-integration-test", "observability-integration-test" ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./tests/integration/scripts/gardener-kubeconfig.sh
shell: bash
env:
GARDENER_TOKEN: ${{ secrets.GARDENER_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- run: make IMG="europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{github.sha}}" gardener-istio-integration-test
shell: bash
env:
GARDENER_KUBECONFIG: "/home/runner/work/istio/istio/gardener_kubeconfig.yaml"
GARDENER_PROJECT_NAME: "goats"
GARDENER_PROVIDER_SECRET_NAME: "goat"
GARDENER_PROVIDER: "gcp"
GARDENER_REGION: "europe-west3"
GARDENER_CLUSTER_VERSION: "1.29.7"
MACHINE_TYPE: "n2-standard-4"
DISK_SIZE: 50
DISK_TYPE: "pd-standard"
SCALER_MAX: 20
SCALER_MIN: 3
MAKE_TEST_TARGET: ${{ matrix.test_make_target }}
istio-integration-aws-specific:
name: Istio integration test AWS specific
runs-on: ubuntu-latest
needs: [build-image]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./tests/integration/scripts/gardener-kubeconfig.sh
shell: bash
env:
GARDENER_TOKEN: ${{ secrets.GARDENER_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- run: make IMG="europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{github.sha}}" gardener-aws-integration-test
shell: bash
env:
GARDENER_KUBECONFIG: "/home/runner/work/istio/istio/gardener_kubeconfig.yaml"
GARDENER_PROJECT_NAME: "goats"
GARDENER_PROVIDER_SECRET_NAME: "aws-gardener-access"
GARDENER_PROVIDER: "aws"
GARDENER_CLUSTER_VERSION: "1.29.7"
GARDENER_REGION: "eu-west-1"
MACHINE_TYPE: "m5.xlarge"
DISK_SIZE: 50
DISK_TYPE: "gp2"
SCALER_MAX: 3
SCALER_MIN: 1
istio-integration-gcp-specific:
name: Istio integration test GCP specific
runs-on: ubuntu-latest
needs: [build-image]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./tests/integration/scripts/gardener-kubeconfig.sh
shell: bash
env:
GARDENER_TOKEN: ${{ secrets.GARDENER_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- run: make IMG="europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{github.sha}}" gardener-gcp-integration-test
shell: bash
env:
GARDENER_KUBECONFIG: "/home/runner/work/istio/istio/gardener_kubeconfig.yaml"
GARDENER_PROJECT_NAME: "goats"
GARDENER_PROVIDER_SECRET_NAME: "goat"
GARDENER_PROVIDER: "gcp"
GARDENER_REGION: "europe-west3"
GARDENER_CLUSTER_VERSION: "1.29.7"
MACHINE_TYPE: "n2-standard-4"
DISK_SIZE: 50
DISK_TYPE: "pd-standard"
SCALER_MAX: 20
SCALER_MIN: 3
istio-integration-aws:
name: Istio integration test AWS
runs-on: ubuntu-latest
needs: [build-image]
strategy:
fail-fast: false
matrix:
test_make_target: [ "configuration-integration-test", "mesh-communication-integration-test", "installation-integration-test", "observability-integration-test" ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: ./tests/integration/scripts/gardener-kubeconfig.sh
shell: bash
env:
GARDENER_TOKEN: ${{ secrets.GARDENER_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- run: make IMG="europe-docker.pkg.dev/kyma-project/prod/istio-manager:${{github.sha}}" gardener-istio-integration-test
shell: bash
env:
GARDENER_KUBECONFIG: "/home/runner/work/istio/istio/gardener_kubeconfig.yaml"
GARDENER_PROJECT_NAME: "goats"
GARDENER_PROVIDER_SECRET_NAME: "aws-gardener-access"
GARDENER_PROVIDER: "aws"
GARDENER_CLUSTER_VERSION: "1.29.7"
GARDENER_REGION: "eu-west-1"
MACHINE_TYPE: "m5.xlarge"
DISK_SIZE: 50
DISK_TYPE: "gp2"
SCALER_MAX: 3
SCALER_MIN: 1
MAKE_TEST_TARGET: ${{ matrix.test_make_target }}
slack_failed_notification:
name: Slack Notification
runs-on: ubuntu-latest
if: ${{ failure() }}
needs: [istio-upgrade-integration-test, istio-integration-test, istio-integration-gcp, istio-integration-aws, istio-integration-aws-specific, istio-integration-gcp-specific]
steps:
- uses: actions/checkout@v4
- name: Notify
uses: ./.github/actions/slack-notification-failed-workflow
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}