Skip to content

Commit

Permalink
Run "Post-test information gathering" step on cancellation
Browse files Browse the repository at this point in the history
Otherwise it's difficult to figure out why the connectivity check
timed out.

Ref: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions

Signed-off-by: Michi Mutsuzaki <[email protected]>
  • Loading branch information
michi-covalent authored and tklauser committed Jul 14, 2021
1 parent 8ed8abb commit 607c2a0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
cilium connectivity test --debug --all-flows
- name: Post-test information gathering
if: ${{ failure() }}
if: ${{ !success() }}
run: |
cilium status
kubectl get pods --all-namespaces -o wide
Expand All @@ -130,7 +130,7 @@ jobs:
shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently

- name: Upload artifacts
if: ${{ failure() }}
if: ${{ !success() }}
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with:
name: cilium-sysdump-out.zip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eks-tunnel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
kubectl -n kube-system wait job/cilium-cli --for=condition=complete --timeout=10m
- name: Post-test information gathering
if: ${{ failure() }}
if: ${{ !success() }}
run: |
kubectl logs --timestamps -n kube-system job/cilium-cli-install
kubectl logs --timestamps -n kube-system job/cilium-cli
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently

- name: Upload artifacts
if: ${{ failure() }}
if: ${{ !success() }}
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with:
name: cilium-sysdump-out.zip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
kubectl -n kube-system wait job/cilium-cli --for=condition=complete --timeout=10m
- name: Post-test information gathering
if: ${{ failure() }}
if: ${{ !success() }}
run: |
kubectl logs --timestamps -n kube-system job/cilium-cli-install
kubectl logs --timestamps -n kube-system job/cilium-cli
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently

- name: Upload artifacts
if: ${{ failure() }}
if: ${{ !success() }}
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with:
name: cilium-sysdump-out.zip
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/externalworkloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ jobs:
kubectl -n kube-system wait job/cilium-cli --for=condition=complete --timeout=10m
- name: Post-test installation logs
if: ${{ failure() }}
if: ${{ !success() }}
run: |
kubectl logs --timestamps -n kube-system job/cilium-cli-install
- name: Post-test information gathering
if: ${{ failure() }}
if: ${{ !success() }}
run: |
kubectl logs --timestamps -n kube-system job/cilium-cli
gcloud compute ssh ${{ env.vmName }} --zone ${{ env.zone }} --command "cilium status"
Expand All @@ -177,7 +177,7 @@ jobs:
shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently

- name: Upload artifacts
if: ${{ failure() }}
if: ${{ !success() }}
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with:
name: cilium-sysdump-out.zip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
kubectl -n kube-system wait job/cilium-cli --for=condition=complete --timeout=15m
- name: Post-test information gathering
if: ${{ failure() }}
if: ${{ !success() }}
run: |
kubectl logs --timestamps -n kube-system job/cilium-cli
kubectl exec -n kube-system job/cilium-cli -- cilium status
Expand All @@ -109,7 +109,7 @@ jobs:
shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently

- name: Upload artifacts
if: ${{ failure() }}
if: ${{ !success() }}
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with:
name: cilium-sysdump-out.zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently

- name: Upload Artifacts
if: ${{ failure() }}
if: ${{ !success() }}
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with:
name: cilium-sysdump-out.zip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/multicluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
kubectl -n kube-system wait job/cilium-cli --for=condition=complete --timeout=20m
- name: Post-test information gathering
if: ${{ failure() }}
if: ${{ !success() }}
run: |
kubectl logs --timestamps -n kube-system job/cilium-cli
Expand All @@ -151,7 +151,7 @@ jobs:
shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently

- name: Upload artifacts
if: ${{ failure() }}
if: ${{ !success() }}
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700
with:
name: cilium-sysdump-out.zip
Expand Down

0 comments on commit 607c2a0

Please sign in to comment.