Skip to content

Commit

Permalink
add kubectlko log after e2e failed
Browse files Browse the repository at this point in the history
  • Loading branch information
changluyi committed Mar 14, 2023
1 parent 4260691 commit d2cce41
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,14 @@ jobs:
E2E_NETWORK_MODE: ${{ matrix.mode }}
run: make k8s-conformance-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

k8s-netpol-e2e:
name: Kubernetes Network Policy E2E
if: |
Expand Down Expand Up @@ -454,6 +462,14 @@ jobs:
working-directory: ${{ env.E2E_DIR }}
run: make k8s-netpol-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

k8s-netpol-legacy-e2e:
name: Kubernetes Network Policy Legacy E2E
if: |
Expand Down Expand Up @@ -549,6 +565,14 @@ jobs:
working-directory: ${{ env.E2E_DIR }}
run: make k8s-netpol-legacy-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

cyclonus-netpol-e2e:
name: Cyclonus Network Policy E2E
if: |
Expand Down Expand Up @@ -621,6 +645,14 @@ jobs:
working-directory: ${{ env.E2E_DIR }}
run: make cyclonus-netpol-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

kube-ovn-conformance-e2e:
name: Kube-OVN Conformance E2E
needs:
Expand Down Expand Up @@ -710,6 +742,14 @@ jobs:
E2E_IP_FAMILY: ${{ matrix.ip-family }}
run: make kube-ovn-conformance-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

- name: Cleanup
run: sh dist/images/cleanup.sh

Expand Down Expand Up @@ -792,6 +832,14 @@ jobs:
working-directory: ${{ env.E2E_DIR }}
run: make kube-ovn-ic-conformance-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

chart-installation-test:
name: Chart Installation Test
needs: build-kube-ovn
Expand Down Expand Up @@ -1026,6 +1074,14 @@ jobs:
working-directory: ${{ env.E2E_DIR }}
run: make kube-ovn-lb-svc-conformance-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

installation-compatibility-test:
name: Installation Compatibility Test
needs: build-kube-ovn
Expand Down Expand Up @@ -1150,6 +1206,14 @@ jobs:
E2E_CILIUM_CHAINING: "true"
run: make k8s-conformance-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

- name: Cleanup
run: sh dist/images/cleanup.sh

Expand Down Expand Up @@ -1250,6 +1314,14 @@ jobs:
E2E_IP_FAMILY: ${{ matrix.ip-family }}
run: make kube-ovn-security-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

- name: Cleanup
run: sh dist/images/cleanup.sh

Expand Down Expand Up @@ -1404,5 +1476,13 @@ jobs:
working-directory: ${{ env.E2E_DIR }}
run: make kube-ovn-submariner-conformance-e2e

- name: kubectl ko log
if: failure() && steps.e2e.outcome != 'success'
run: make kubectl-ko-log
uses: actions/upload-artifact@v3
with:
name: kubectl-ko-log
path: kubectl-ko-log.tar

- name: Cleanup
run: sh dist/images/cleanup.sh
4 changes: 4 additions & 0 deletions Makefile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ kube-ovn-security-e2e:
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
--focus=CNI:Kube-OVN ./test/e2e/security/security.test

.PHONY: kubectl-ko-log
kubectl-ko-log:
kubectl ko log all all all

0 comments on commit d2cce41

Please sign in to comment.