forked from istio/istio
-
Notifications
You must be signed in to change notification settings - Fork 8
736 lines (651 loc) · 28.1 KB
/
e2e_tests.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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
name: e2e-tests
on:
push:
tags:
- "test-*"
env:
HUB: ${{ secrets.TEST_HUB }}
jobs:
# copied from make_release.yml
build_fips_proxy:
# Only run this job when the release type equals "fips".
if: contains(github.event.ref, 'fips')
name: build fips proxy binary
timeout-minutes: 840
runs-on: ['self-hosted','Linux','x64','c5.4xlarge']
env:
RELEASE_GCS_PATH: gs://getistio-build/proxy-fips
steps:
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
- name: Get normalized tag
id: get_normalized_ver
run: echo ::set-output name=NORMALIZED_TAG::$(echo $TAG | sed 's/test-//g' | sed 's/-.*//g')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- name: Checkout
uses: actions/checkout@v2
with:
repository: "istio/proxy"
ref: ${{ steps.get_normalized_ver.outputs.NORMALIZED_TAG }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Check if already built
id: check_already_built
env:
REL_BRANCH_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
TAG: ${{ steps.get_tag.outputs.TAG }}
run: |
SHA=$(echo $TAG | sed 's/test-//g' | sed 's/[0-9].[0-9][0-9].[0-9]-[A-Za-z]*-//g' | sed 's/-.*//g')
SHOULD_BUILD=1
SHOULD_COPY=1
if gsutil ls ${RELEASE_GCS_PATH} | grep "${SHA}[^-]" ; then
SHOULD_BUILD=0
fi
if [ $(bc <<< "$REL_BRANCH_VER > 1.17") -eq 1 ];then
SHOULD_COPY=0
fi
echo ::set-output name=should_build::${SHOULD_BUILD}
echo ::set-output name=should_copy::${SHOULD_COPY}
- name: Tweak make recipe
if: ${{ steps.check_already_built.outputs.should_build == '1' }}
# 1) remove unnecessary dependency on naive "build" target
# 2) remove "-p" flag to not push and build container,
# 3) replace RELEASE_GCS_PATH var with the literal due to docker build.
# from push_release.
run: |
ESCAPED_RELEASE_GCS_PATH=$(printf '%s\n' "$RELEASE_GCS_PATH" | sed -e 's/[\/&]/\\&/g')
sed -i "s/\-p//g; s/push_release: build/push_release:/g; s/\"\$(RELEASE_GCS_PATH)\"/${ESCAPED_RELEASE_GCS_PATH}/g" Makefile.core.mk
- name: Tweak release-binary script
if: ${{ steps.check_already_built.outputs.should_build == '1' }}
# 1) Setup in-docker auth against gcloud
# 2) Remove unnecessary debug build
# 3) Remove unnecessary Wasm build and publish
# Note that /work is the mount destination of the current home of make command with BUILD_WITH_CONTAINER=1.
run: |
CREDENTIAL_FILE_NAME=$(echo ${GOOGLE_APPLICATION_CREDENTIALS} | awk -F/ '{print $NF}')
cp scripts/release-binary.sh scripts/release-binary.sh.tmp
echo gcloud auth activate-service-account --key-file="/work/${CREDENTIAL_FILE_NAME}" > scripts/release-binary.sh
cat scripts/release-binary.sh.tmp >> scripts/release-binary.sh
sed -i 's/for config in release release-symbol asan debug/for config in release/g' scripts/release-binary.sh
sed -i -n '/Build and publish Wasm plugins/q;p' scripts/release-binary.sh
cat scripts/release-binary.sh
- name: Add FIPS flag
if: ${{ steps.check_already_built.outputs.should_build == '1' }}
run: echo "build --define boringssl=fips" >> .bazelrc
- name: Build and push
if: ${{ steps.check_already_built.outputs.should_build == '1' }}
env:
BUILD_WITH_CONTAINER: 1
run: make push_release
- name: Put CentOS binary
env:
REL_BRANCH_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
TAG: ${{ steps.get_tag.outputs.TAG }}
# Copy the binary built on Ubuntu to CentOS path - this binar cannot run on CentOS/RHEL 7, but fine with CentOS 8.
# The point is that we cannot build FIPS binary directly on CentOS 7 due to the constraints described in the BoringCrypto certification.
run: |
SHA=$(echo $TAG | sed 's/test-//g' | sed 's/[0-9].[0-9][0-9].[0-9]-[A-Za-z]*-//g' | sed 's/-.*//g')
gsutil cp ${RELEASE_GCS_PATH}/envoy-alpha-${SHA}.tar.gz ${RELEASE_GCS_PATH}/envoy-centos-alpha-${SHA}.tar.gz
- name: Put Wasm binary
if: ${{ steps.check_already_built.outputs.should_build == '1' && steps.check_already_built.outputs.should_copy == '1' }}
# Copy the built Wasm binary in the upstream to the bucket - Wasm is nothing to do with FIPS stuff.
env:
UPSTREAM_GCSP_PATH: gs://istio-build/proxy
REL_BRANCH_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
TAG: ${{ steps.get_tag.outputs.TAG }}
run: |
SHA1=$(git rev-parse --verify HEAD)
SHA=$(echo $TAG | sed 's/test-//g' | sed 's/[0-9].[0-9][0-9].[0-9]-[A-Za-z]*-//g' | sed 's/-.*//g')
gsutil cp "${UPSTREAM_GCSP_PATH}/metadata_exchange-${SHA1}.compiled.wasm" "${RELEASE_GCS_PATH}/metadata_exchange-${SHA}.compiled.wasm"
gsutil cp "${UPSTREAM_GCSP_PATH}/metadata_exchange-${SHA1}.compiled.wasm.sha256" "${RELEASE_GCS_PATH}/metadata_exchange-${SHA}.compiled.wasm.sha256"
gsutil cp "${UPSTREAM_GCSP_PATH}/metadata_exchange-${SHA1}.wasm" "${RELEASE_GCS_PATH}/metadata_exchange-${SHA}.wasm"
gsutil cp "${UPSTREAM_GCSP_PATH}/metadata_exchange-${SHA1}.wasm.sha256" "${RELEASE_GCS_PATH}/metadata_exchange-${SHA}.wasm.sha256"
gsutil cp "${UPSTREAM_GCSP_PATH}/stats-${SHA1}.compiled.wasm" "${RELEASE_GCS_PATH}/stats-${SHA}.compiled.wasm"
gsutil cp "${UPSTREAM_GCSP_PATH}/stats-${SHA1}.compiled.wasm.sha256" "${RELEASE_GCS_PATH}/stats-${SHA}.compiled.wasm.sha256"
gsutil cp "${UPSTREAM_GCSP_PATH}/stats-${SHA1}.wasm" "${RELEASE_GCS_PATH}/stats-${SHA}.wasm"
gsutil cp "${UPSTREAM_GCSP_PATH}/stats-${SHA1}.wasm.sha256" "${RELEASE_GCS_PATH}/stats-${SHA}.wasm.sha256"
build_fips_arm_proxy:
# Do not run this job when the release type equals "fips"as we do not support fips compliant ARM build yet.
# if: contains(github.event.ref, 'fips')
if: false
name: build ARM proxy binary
timeout-minutes: 1440 # 12 hours
runs-on: ['self-hosted','Linux','ARM64','arm64-32']
env:
RELEASE_GCS_PATH: gs://getistio-build/proxy-fips
ARCH_SUFFIX: arm64
steps:
- name: Get normalized tag
id: get_normalized_ver
run: echo ::set-output name=NORMALIZED_TAG::$(echo $TAG | sed 's/test-//g' | sed 's/-.*//g')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- name: Checkout
uses: actions/checkout@v2
with:
repository: "istio/proxy"
ref: ${{ steps.get_normalized_ver.outputs.NORMALIZED_TAG }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Check if already built
id: check_already_built
env:
REL_BRANCH_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
TAG: ${{ steps.get_tag.outputs.TAG }}
run: |
SHA=$(echo $TAG | sed 's/test-//g' | sed 's/[0-9].[0-9][0-9].[0-9]-[A-Za-z]*-//g' | sed 's/-.*//g')
SHOULD_BUILD=1
if gsutil ls ${RELEASE_GCS_PATH} | grep "${SHA}[^-]" ; then
SHOULD_BUILD=0
fi
echo ::set-output name=should_build::${SHOULD_BUILD}
- name: Tweak make recipe
if: ${{ steps.check_already_built.outputs.should_build == '1' }}
# 1) remove unnecessary dependency on naive "build" target
# 2) remove "-p" flag to not push and build container,
# 3) replace RELEASE_GCS_PATH var with the literal due to docker build.
# from push_release.
run: |
ESCAPED_RELEASE_GCS_PATH=$(printf '%s\n' "$RELEASE_GCS_PATH" | sed -e 's/[\/&]/\\&/g')
sed -i "s/\-p//g; s/push_release: build/push_release:/g; s/\"\$(RELEASE_GCS_PATH)\"/${ESCAPED_RELEASE_GCS_PATH}/g" Makefile.core.mk
- name: Tweak release-binary script
if: ${{ steps.check_already_built.outputs.should_build == '1' }}
# 1) Setup in-docker auth against gcloud
# 2) Remove unnecessary debug build
# 3) Remove unnecessary Wasm build and publish
# Note that /work is the mount destination of the current home of make command with BUILD_WITH_CONTAINER=1.
run: |
CREDENTIAL_FILE_NAME=$(echo ${GOOGLE_APPLICATION_CREDENTIALS} | awk -F/ '{print $NF}')
cp scripts/release-binary.sh scripts/release-binary.sh.tmp
echo gcloud auth activate-service-account --key-file="/work/${CREDENTIAL_FILE_NAME}" > scripts/release-binary.sh
cat scripts/release-binary.sh.tmp >> scripts/release-binary.sh
sed -i 's/release release\-symbol debug/release release\-symbol/' scripts/release-binary.sh
sed -i '/if \[\[ "${BUILD_ENVOY_BINARY_ONLY}" !/, +6d' scripts/release-binary.sh
sed -i -n '/Build and publish Wasm plugins/q;p' scripts/release-binary.sh
cat scripts/release-binary.sh
- name: Add FIPS flag
if: ${{ steps.check_already_built.outputs.should_build == '1' }}
run: echo "build --define boringssl=fips" >> .bazelrc
- name: Build and push
if: ${{ steps.check_already_built.outputs.should_build == '1' }}
env:
BUILD_ENVOY_BINARY_ONLY: 1
BUILD_WITH_CONTAINER: 1
run: make push_release
create-test-images-arm64:
name: create-test-images-arm64
runs-on: ["self-hosted", "arm64"]
env:
TARGETARCH: arm64
DOCKER_ARCHITECTURES: linux/arm64
needs: [build_fips_arm_proxy]
# 'if' condition causes this job to run even if some of the dependent jobs
# have been skipped, e.g. `build_fips_proxy`.
# see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-not-requiring-dependent-jobs-to-be-successful
if: "contains(github.event.ref, 'multiarch')"
steps:
- name: checkout
uses: actions/checkout@v2
- name: Get Registry
id: get_registry
run: |
[[ ${HUB} == *.* ]] && REGISTRY=$(echo ${HUB} | cut -d/ -f1)
echo REGISTRY=${REGISTRY}
echo REGISTRY=${REGISTRY} >> $GITHUB_ENV
- name: docker-login-non-docker
uses: docker/login-action@v1
if: ${{ env.REGISTRY != null }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.TEST_HUB_USER }}
password: ${{ secrets.TEST_HUB_PASS }}
- name: docker-login-docker
uses: docker/login-action@v1
if: ${{ env.REGISTRY == null }}
with:
username: ${{ secrets.TEST_HUB_USER }}
password: ${{ secrets.TEST_HUB_PASS }}
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- name: build and push images
run: bash ./tetrateci/create_istio_release.sh
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
TEST: "true"
# if the tag contains fips we are doing a fips build
BUILD: ${{ contains(github.event.ref, 'fips') && 'fips' }}
REL_BRANCH_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
create-test-images-amd64:
name: create-test-images-amd64
#runs-on: ['self-hosted','Linux','x64','m5']
runs-on: ['self-hosted','Linux','x64','c5.4xlarge']
needs: [build_fips_proxy]
# 'if' condition causes this job to run even if some of the dependent jobs
# have been skipped, e.g. `build_fips_proxy`.
# see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-not-requiring-dependent-jobs-to-be-successful
if: ${{ !cancelled() && !failure() }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: Get Registry
id: get_registry
run: |
[[ ${HUB} == *.* ]] && REGISTRY=$(echo ${HUB} | cut -d/ -f1)
echo REGISTRY=${REGISTRY}
echo REGISTRY=${REGISTRY} >> $GITHUB_ENV
- name: docker-login-non-docker
uses: docker/login-action@v1
if: ${{ env.REGISTRY != null }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.TEST_HUB_USER }}
password: ${{ secrets.TEST_HUB_PASS }}
- name: docker-login-docker
uses: docker/login-action@v1
if: ${{ env.REGISTRY == null }}
with:
username: ${{ secrets.TEST_HUB_USER }}
password: ${{ secrets.TEST_HUB_PASS }}
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- name: build and push images
run: bash ./tetrateci/create_istio_release.sh
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
TEST: "true"
# if the tag contains fips we are doing a fips build
BUILD: ${{ contains(github.event.ref, 'fips') && 'fips' }}
REL_BRANCH_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
create-multiarch-images:
name: create-multiarch-images
runs-on: ubuntu-latest
needs: [create-test-images-amd64, create-test-images-arm64]
# 'if' condition causes this job to run even if some of the dependent jobs
# have been skipped, e.g. `build_fips_proxy`.
# see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-not-requiring-dependent-jobs-to-be-successful
if: "contains(github.event.ref, 'multiarch')"
steps:
- name: checkout
uses: actions/checkout@v2
- name: Get Registry
id: get_registry
run: |
[[ ${HUB} == *.* ]] && REGISTRY=$(echo ${HUB} | cut -d/ -f1)
echo REGISTRY=${REGISTRY}
echo REGISTRY=${REGISTRY} >> $GITHUB_ENV
- name: docker-login-non-docker
uses: docker/login-action@v1
if: ${{ env.REGISTRY != null }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.TEST_HUB_USER }}
password: ${{ secrets.TEST_HUB_PASS }}
- name: docker-login-docker
uses: docker/login-action@v1
if: ${{ env.REGISTRY == null }}
with:
username: ${{ secrets.TEST_HUB_USER }}
password: ${{ secrets.TEST_HUB_PASS }}
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- name: build and push images
run: bash ./tetrateci/create_multiarch_images.sh
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
TEST: "true"
# if the tag contains fips we are doing a fips build
BUILD: ${{ contains(github.event.ref, 'fips') && 'fips' }}
REL_BRANCH_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
eks-e2e-arm64-test:
name: eks-e2e-arm64-test
runs-on: ubuntu-latest
needs: [create-multiarch-images]
# 'if' condition causes this job to run even if some of the dependent jobs
# have been skipped, e.g. `build_fips_proxy`.
# see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-not-requiring-dependent-jobs-to-be-successful
# if: false
if: ${{ !cancelled() && !failure() }}
strategy:
fail-fast: false
matrix:
version: ["1.25", "1.26", "1.24"] # available versions according to https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
steps:
- name: checkout
uses: actions/checkout@v2
- name: aws-config
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-
- name: eks-cluster-create
run: bash ./tetrateci/create_eks_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
TEST_ARCH: arm64
- name: integration-tests
run: bash ./tetrateci/test_${ISTIO_MINOR_VER}_arm.sh
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
CLUSTER: eks-arm64
K8S_VERSION: ${{ matrix.version }}
- name: eks-cluster-delete
if: always()
run: bash ./tetrateci/cleanup_eks_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
TEST_ARCH: arm64
eks-e2e-test:
name: eks-e2e-test
runs-on: ubuntu-latest
needs: [create-multiarch-images]
# 'if' condition causes this job to run even if some of the dependent jobs
# have been skipped, e.g. `build_fips_proxy`.
# see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-not-requiring-dependent-jobs-to-be-successful
if: ${{ !cancelled() && !failure() }}
strategy:
fail-fast: false
matrix:
version: ["1.26", "1.25", "1.24"] # available versions according to https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html
steps:
- name: checkout
uses: actions/checkout@v2
- name: aws-config
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-
- name: eks-cluster-create
run: bash ./tetrateci/create_eks_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
- name: integration-tests
run: bash ./tetrateci/test_${ISTIO_MINOR_VER}.sh
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
CLUSTER: eks
K8S_VERSION: ${{ matrix.version }}
- name: eks-cluster-delete
if: always()
run: bash ./tetrateci/cleanup_eks_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
gke-e2e-test:
name: gke-e2e-test
runs-on: ubuntu-latest
needs: [create-multiarch-images]
# 'if' condition causes this job to run even if some of the dependent jobs
# have been skipped, e.g. `build_fips_proxy`.
# see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#example-not-requiring-dependent-jobs-to-be-successful
if: ${{ !cancelled() && !failure() }}
strategy:
fail-fast: false
# available versions according to https://cloud.google.com/kubernetes-engine/versioning
matrix:
include:
- version: "1.24"
channel: "rapid"
- version: "1.25"
channel: "regular"
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-
- name: gke-cluster-create
run: bash ./tetrateci/create_gke_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
CHAN: ${{ matrix.channel }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
- name: integration-tests
run: bash ./tetrateci/test_${ISTIO_MINOR_VER}.sh
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
CLUSTER: gke
K8S_VERSION: ${{ matrix.version }}
- name: gke-cluster-delete
if: always()
run: bash ./tetrateci/cleanup_gke_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
aks-e2e-test:
## TODO: temporarily disabling it till credentials are set
if: false
name: aks-e2e-test
runs-on: ubuntu-latest
needs: [create-multiarch-images]
strategy:
fail-fast: false
matrix:
version: [1.20, 1.19, 1.18, 1.17]
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up Cloud SDK
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-
- name: aks-cluster-create
run: bash ./tetrateci/create_aks_cluster.sh
env:
RESOURCE: ${{ secrets.AZURE_RESOURCE }}
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
- name: integration-tests
run: bash ./tetrateci/test_${ISTIO_MINOR_VER}.sh
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
CLUSTER: aks
K8S_VERSION: ${{ matrix.version }}
- name: aks-cluster-delete
if: always()
run: bash ./tetrateci/cleanup_aks_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
RESOURCE: ${{ secrets.AZURE_RESOURCE }}
eksd-e2e-test:
name: eksd-e2e-test
runs-on: ubuntu-latest
needs: [create-multiarch-images, eks-e2e-test]
strategy:
fail-fast: false
matrix:
version: ["1.19", "1.18"]
steps:
- name: checkout
uses: actions/checkout@v2
- name: aws-config
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Get minor version
id: get_minor_ver
run: echo ::set-output name=REL_BRANCH_VER::$(echo $TAG | grep -Eo '[0-9]+\.[0-9]+')
shell: bash
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}-go-
- name: eksd-cluster-create
run: bash ./tetrateci/create_eksd_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
AWS_REGION: ${{ secrets.AWS_REGION }}
- name: integration-tests
run: bash ./tetrateci/test_${ISTIO_MINOR_VER}.sh
env:
TAG: ${{ steps.get_tag.outputs.TAG }}
CLUSTER: eks # patches for eks and eksd should be same
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
- name: eksd-cluster-delete
if: always()
run: bash ./tetrateci/cleanup_eksd_cluster.sh
env:
K8S_VERSION: ${{ matrix.version }}
ISTIO_MINOR_VER: ${{ steps.get_minor_ver.outputs.REL_BRANCH_VER }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
AWS_REGION: ${{ secrets.AWS_REGION }}
create-new-tag:
name: create-new-tag
runs-on: ubuntu-latest
# since aks tests are disabled
# needs: [eks-e2e-test, gke-e2e-test, aks-e2e-test]
needs: [eks-e2e-arm64-test, eksd-e2e-test, gke-e2e-test]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get the tag
id: get_tag
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\/test-/}
shell: bash
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_tag.outputs.TAG }}
release_name: Tetrate Istio
draft: false
prerelease: false