-
Notifications
You must be signed in to change notification settings - Fork 25
196 lines (183 loc) · 6.77 KB
/
post-main-workflow.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
name: Post Main Workflow
permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkouts
on:
push:
branches:
- main
paths-ignore:
- "docs/**"
- "**/*.md"
- "tests/performance/**"
- "OWNERS"
- "CODEOWNERS"
- "sec-scanners-config.yaml"
- "external-images.yaml"
- ".reuse/**"
jobs:
unit-tests:
name: Dispatch unit test
uses: ./.github/workflows/call-unit-lint.yaml
if: github.event.pull_request.draft == false
secrets: inherit
build-image:
name: Build manager image
if: ${{ github.event.pull_request.draft == false }}
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/main/istio-manager
dockerfile: Dockerfile
context: .
build-args: |
VERSION=${{ github.ref_name }}
tags: "${{ github.sha }}"
build-experimental-image:
name: Build manager image - experimental
if: ${{ github.event.pull_request.draft == false }}
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/main/istio-manager
dockerfile: Dockerfile
context: .
build-args: |
VERSION=${{ github.ref_name }}-experimental
GO_BUILD_TAGS=experimental
tags: "${{ github.sha }}-experimental"
istio-upgrade-test-k3d:
name: Istio upgrade integration test K3D
runs-on: ubuntu-latest
needs: [ build-image ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/upgrade-integration-test
with:
operator-image-name: "europe-docker.pkg.dev/kyma-project/prod/istio/main/istio-manager:${{github.sha}}"
target_branch: ${{ github.ref_name }}
istio-upgrade-test-aws:
name: Istio upgrade integration test AWS
runs-on: ubuntu-latest
needs: [ build-image ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/e2e-test-gardener
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_BRANCH: ${{ github.ref_name }}
with:
manager_image: "europe-docker.pkg.dev/kyma-project/prod/istio/main/istio-manager:${{github.sha}}"
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: aws
test_make_target: "istio-upgrade-integration-test"
istio-e2e-test-k3d:
name: Istio E2E test K3D
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/e2e-test-k3d
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
test_make_target: ${{ matrix.test_make_target }}
operator-image-name: "europe-docker.pkg.dev/kyma-project/prod/istio/main/istio-manager:${{github.sha}}"
servers-memory: "16"
agents: 2
istio-e2e-gcp:
name: Istio E2E 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
- uses: ./.github/actions/e2e-test-gardener
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
manager_image: "europe-docker.pkg.dev/kyma-project/prod/istio/main/istio-manager:${{github.sha}}"
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: gcp
test_make_target: ${{ matrix.test_make_target }}
istio-e2e-aws-specific:
name: Istio E2E test AWS specific
runs-on: ubuntu-latest
needs: [build-image]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/e2e-test-gardener
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
manager_image: "europe-docker.pkg.dev/kyma-project/prod/istio/main/istio-manager:${{github.sha}}"
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: aws
test_make_target: aws-integration-test
istio-e2e-gcp-specific:
name: Istio E2E test GCP specific
runs-on: ubuntu-latest
needs: [build-image]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/e2e-test-gardener
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
manager_image: "europe-docker.pkg.dev/kyma-project/prod/istio/main/istio-manager:${{github.sha}}"
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: gcp
test_make_target: gcp-integration-test
istio-e2e-aws:
name: Istio E2E 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
- uses: ./.github/actions/e2e-test-gardener
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
manager_image: "europe-docker.pkg.dev/kyma-project/prod/istio/main/istio-manager:${{github.sha}}"
gardener_secret: ${{ secrets.GARDENER_TOKEN }}
gardener_project_name: ${{ vars.GARDENER_PROJECT_NAME }}
gardener_provider: aws
test_make_target: ${{ matrix.test_make_target }}
slack_failed_notification:
name: Slack Notification
runs-on: ubuntu-latest
if: ${{ failure() }}
needs: [istio-upgrade-test-aws, istio-upgrade-test-k3d, istio-e2e-test-k3d, istio-e2e-gcp, istio-e2e-aws, istio-e2e-aws-specific, istio-e2e-gcp-specific]
steps:
- uses: actions/checkout@v4
- name: Notify
uses: ./.github/actions/slack-notification-failed-workflow
with:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}