@@ -26,8 +26,8 @@ concurrency:
26
26
cancel-in-progress : true
27
27
28
28
env :
29
- GOSEC_VERSION : ' 2.14 .0'
30
- HELM_VERSION : v3.10.1
29
+ GOSEC_VERSION : ' 2.15 .0'
30
+ HELM_VERSION : v3.10.3
31
31
32
32
jobs :
33
33
build-kube-ovn :
60
60
61
61
- name : Install gosec
62
62
run : |
63
- curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin 'v${{ env.GOSEC_VERSION }}'
63
+ tmp=$(mktemp -d)
64
+ archive="gosec_${{ env.GOSEC_VERSION }}_$(go env GOHOSTOS)_$(go env GOHOSTARCH).tar.gz"
65
+ wget -q -O "$tmp/$archive" https://github.com/securego/gosec/releases/download/v${{ env.GOSEC_VERSION }}/$archive
66
+ tar --no-same-owner -C "$tmp" -xzf "$tmp/$archive"
67
+ install "$tmp/gosec" /usr/local/bin
68
+ rm -rf $tmp
64
69
65
70
- name : Build
66
71
run : |
@@ -118,9 +123,57 @@ jobs:
118
123
# name: centos8-compile
119
124
# path: centos8-compile.tar
120
125
126
+ build-e2e-binaries :
127
+ name : Build E2E Binaries
128
+ runs-on : ubuntu-22.04
129
+ timeout-minutes : 15
130
+ steps :
131
+ - uses : actions/checkout@v3
132
+
133
+ - name : Create the default branch directory
134
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
135
+ run : mkdir -p test/e2e/source
136
+
137
+ - name : Check out the default branch
138
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
139
+ uses : actions/checkout@v3
140
+ with :
141
+ ref : ${{ github.event.repository.default_branch }}
142
+ fetch-depth : 1
143
+ path : test/e2e/source
144
+
145
+ - name : Export E2E directory
146
+ run : |
147
+ if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then
148
+ echo "E2E_DIR=." >> "$GITHUB_ENV"
149
+ else
150
+ echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
151
+ fi
152
+
153
+ - uses : actions/setup-go@v3
154
+ with :
155
+ go-version-file : ${{ env.E2E_DIR }}/go.mod
156
+ check-latest : true
157
+
158
+ - name : Export Go full version
159
+ run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
160
+
161
+ - name : Go cache
162
+ uses : actions/cache@v3
163
+ with :
164
+ path : |
165
+ ~/.cache/go-build
166
+ ~/go/pkg/mod
167
+ key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
168
+ restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
169
+
170
+ - run : make e2e-compile
171
+
121
172
k8s-conformance-e2e :
122
173
name : Kubernetes Conformance E2E
123
- needs : build-kube-ovn
174
+ needs :
175
+ - build-kube-ovn
176
+ - build-e2e-binaries
124
177
runs-on : ubuntu-22.04
125
178
timeout-minutes : 60
126
179
strategy :
@@ -137,9 +190,11 @@ jobs:
137
190
- uses : actions/checkout@v3
138
191
139
192
- name : Create the default branch directory
193
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
140
194
run : mkdir -p test/e2e/source
141
195
142
196
- name : Check out the default branch
197
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
143
198
uses : actions/checkout@v3
144
199
with :
145
200
ref : ${{ github.event.repository.default_branch }}
@@ -168,18 +223,14 @@ jobs:
168
223
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
169
224
170
225
- name : Go cache
171
- uses : actions/cache@v3
226
+ uses : actions/cache/restore @v3
172
227
with :
173
228
path : |
174
229
~/.cache/go-build
175
230
~/go/pkg/mod
176
- key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- ${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
231
+ key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
177
232
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
178
233
179
- - name : Build e2e binaries
180
- working-directory : ${{ env.E2E_DIR }}
181
- run : make e2e-compile
182
-
183
234
- name : Install kind
184
235
uses : helm/kind-action@v1
185
236
with :
@@ -215,7 +266,9 @@ jobs:
215
266
k8s-netpol-e2e :
216
267
name : Kubernetes Network Policy E2E
217
268
if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'network policy')
218
- needs : build-kube-ovn
269
+ needs :
270
+ - build-kube-ovn
271
+ - build-e2e-binaries
219
272
runs-on : ubuntu-22.04
220
273
timeout-minutes : 60
221
274
strategy :
@@ -229,9 +282,11 @@ jobs:
229
282
- uses : actions/checkout@v3
230
283
231
284
- name : Create the default branch directory
285
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
232
286
run : mkdir -p test/e2e/source
233
287
234
288
- name : Check out the default branch
289
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
235
290
uses : actions/checkout@v3
236
291
with :
237
292
ref : ${{ github.event.repository.default_branch }}
@@ -260,18 +315,14 @@ jobs:
260
315
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
261
316
262
317
- name : Go cache
263
- uses : actions/cache@v3
318
+ uses : actions/cache/restore @v3
264
319
with :
265
320
path : |
266
321
~/.cache/go-build
267
322
~/go/pkg/mod
268
323
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
269
324
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
270
325
271
- - name : Build e2e binaries
272
- working-directory : ${{ env.E2E_DIR }}
273
- run : make e2e-compile
274
-
275
326
- name : Install kind
276
327
uses : helm/kind-action@v1
277
328
with :
@@ -317,9 +368,11 @@ jobs:
317
368
- uses : actions/checkout@v3
318
369
319
370
- name : Create the default branch directory
371
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
320
372
run : mkdir -p test/e2e/source
321
373
322
374
- name : Check out the default branch
375
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
323
376
uses : actions/checkout@v3
324
377
with :
325
378
ref : ${{ github.event.repository.default_branch }}
@@ -364,7 +417,9 @@ jobs:
364
417
365
418
kube-ovn-conformance-e2e :
366
419
name : Kube-OVN Conformance E2E
367
- needs : build-kube-ovn
420
+ needs :
421
+ - build-kube-ovn
422
+ - build-e2e-binaries
368
423
runs-on : ubuntu-22.04
369
424
timeout-minutes : 30
370
425
strategy :
@@ -378,9 +433,11 @@ jobs:
378
433
- uses : actions/checkout@v3
379
434
380
435
- name : Create the default branch directory
436
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
381
437
run : mkdir -p test/e2e/source
382
438
383
439
- name : Check out the default branch
440
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
384
441
uses : actions/checkout@v3
385
442
with :
386
443
ref : ${{ github.event.repository.default_branch }}
@@ -404,18 +461,14 @@ jobs:
404
461
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
405
462
406
463
- name : Go cache
407
- uses : actions/cache@v3
464
+ uses : actions/cache/restore @v3
408
465
with :
409
466
path : |
410
467
~/.cache/go-build
411
468
~/go/pkg/mod
412
469
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
413
470
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
414
471
415
- - name : Build e2e binaries
416
- working-directory : ${{ env.E2E_DIR }}
417
- run : make e2e-compile
418
-
419
472
- name : Install kind
420
473
uses : helm/kind-action@v1
421
474
with :
@@ -452,16 +505,20 @@ jobs:
452
505
453
506
kube-ovn-ic-conformance-e2e :
454
507
name : Kube-OVN IC Conformance E2E
455
- needs : build-kube-ovn
508
+ needs :
509
+ - build-kube-ovn
510
+ - build-e2e-binaries
456
511
runs-on : ubuntu-22.04
457
512
timeout-minutes : 30
458
513
steps :
459
514
- uses : actions/checkout@v3
460
515
461
516
- name : Create the default branch directory
517
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
462
518
run : mkdir -p test/e2e/source
463
519
464
520
- name : Check out the default branch
521
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
465
522
uses : actions/checkout@v3
466
523
with :
467
524
ref : ${{ github.event.repository.default_branch }}
@@ -482,18 +539,14 @@ jobs:
482
539
check-latest : true
483
540
484
541
- name : Go cache
485
- uses : actions/cache@v3
542
+ uses : actions/cache/restore @v3
486
543
with :
487
544
path : |
488
545
~/.cache/go-build
489
546
~/go/pkg/mod
490
547
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
491
548
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
492
549
493
- - name : Build e2e binaries
494
- working-directory : ${{ env.E2E_DIR }}
495
- run : make e2e-compile
496
-
497
550
- name : Install kind
498
551
uses : helm/kind-action@v1
499
552
with :
@@ -703,7 +756,9 @@ jobs:
703
756
704
757
cilium-chaining-e2e :
705
758
name : Cilium Chaining E2E
706
- needs : build-kube-ovn
759
+ needs :
760
+ - build-kube-ovn
761
+ - build-e2e-binaries
707
762
runs-on : ubuntu-22.04
708
763
timeout-minutes : 30
709
764
steps :
@@ -713,9 +768,11 @@ jobs:
713
768
version : ' ${{ env.HELM_VERSION }}'
714
769
715
770
- name : Create the default branch directory
771
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
716
772
run : mkdir -p test/e2e/source
717
773
718
774
- name : Check out the default branch
775
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
719
776
uses : actions/checkout@v3
720
777
with :
721
778
ref : ${{ github.event.repository.default_branch }}
@@ -744,18 +801,14 @@ jobs:
744
801
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
745
802
746
803
- name : Go cache
747
- uses : actions/cache@v3
804
+ uses : actions/cache/restore @v3
748
805
with :
749
806
path : |
750
807
~/.cache/go-build
751
808
~/go/pkg/mod
752
809
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
753
810
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
754
811
755
- - name : Build e2e binaries
756
- working-directory : ${{ env.E2E_DIR }}
757
- run : make e2e-compile
758
-
759
812
- name : Install kind
760
813
uses : helm/kind-action@v1
761
814
with :
@@ -789,7 +842,9 @@ jobs:
789
842
790
843
kube-ovn-security-e2e :
791
844
name : Kube-OVN Security E2E
792
- needs : build-kube-ovn
845
+ needs :
846
+ - build-kube-ovn
847
+ - build-e2e-binaries
793
848
runs-on : ubuntu-22.04
794
849
timeout-minutes : 30
795
850
strategy :
@@ -809,9 +864,11 @@ jobs:
809
864
- uses : actions/checkout@v3
810
865
811
866
- name : Create the default branch directory
867
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
812
868
run : mkdir -p test/e2e/source
813
869
814
870
- name : Check out the default branch
871
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
815
872
uses : actions/checkout@v3
816
873
with :
817
874
ref : ${{ github.event.repository.default_branch }}
@@ -835,18 +892,14 @@ jobs:
835
892
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
836
893
837
894
- name : Go cache
838
- uses : actions/cache@v3
895
+ uses : actions/cache/restore @v3
839
896
with :
840
897
path : |
841
898
~/.cache/go-build
842
899
~/go/pkg/mod
843
900
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
844
901
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
845
902
846
- - name : Build e2e binaries
847
- working-directory : ${{ env.E2E_DIR }}
848
- run : make e2e-compile
849
-
850
903
- name : Install kind
851
904
uses : helm/kind-action@v1
852
905
with :
0 commit comments