diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index f8dca9fcf..f81d5bf69 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -100,6 +100,6 @@ jobs: message: "e2e test ${{ inputs.test-name }} failed" additionalFields: '[{"title": "Platform", "value": "${{ inputs.platform }}"}]' - name: Cleanup - if: cancelled() && !inputs.skip-undeploy + if: always() && !inputs.skip-undeploy run: | - kubectl delete ns "$(cat workspace/e2e.namespace)" --timeout 5m + kubectl delete ns "$(cat workspace/e2e.namespace)" --timeout 10m diff --git a/.github/workflows/e2e_aks_runtime.yml b/.github/workflows/e2e_aks_runtime.yml index c7ae37188..41fe749c2 100644 --- a/.github/workflows/e2e_aks_runtime.yml +++ b/.github/workflows/e2e_aks_runtime.yml @@ -110,6 +110,6 @@ jobs: message: "e2e test aks-runtime failed" additionalFields: '[{"title": "Platform", "value": "AKS-CLH-SNP"}]' - name: Cleanup - if: cancelled() + if: always() run: | kubectl delete ns "$(cat workspace/e2e.namespace)" --timeout 5m diff --git a/packages/scripts.nix b/packages/scripts.nix index 8521235e4..2d8c7047d 100644 --- a/packages/scripts.nix +++ b/packages/scripts.nix @@ -453,10 +453,10 @@ namespace="$(head -n1 "$2")" pod="$(kubectl get pods -o name -n "$namespace" | grep log-collector | cut -c 5-)" mkdir -p ./workspace/logs - kubectl wait --for=condition=Ready -n "$namespace" "pod/$pod" 1>/dev/null 2>/dev/null - kubectl exec -n "$namespace" "$pod" -- /bin/bash -c "rm -f /exported-logs.tar.gz; tar zcvf /exported-logs.tar.gz /export" 1>/dev/null 2>/dev/null - kubectl cp -n "$namespace" "$pod:/exported-logs.tar.gz" ./workspace/logs/exported-logs.tar.gz 1>/dev/null 2>/dev/null - tar xzvf ./workspace/logs/exported-logs.tar.gz --directory ./workspace/logs 1>/dev/null 2>/dev/null + kubectl wait --for=condition=Ready -n "$namespace" "pod/$pod" + kubectl exec -n "$namespace" "$pod" -- /bin/bash -c "rm -f /exported-logs.tar.gz; tar zcvf /exported-logs.tar.gz /export" + kubectl cp -n "$namespace" "$pod:/exported-logs.tar.gz" ./workspace/logs/exported-logs.tar.gz + tar xzvf ./workspace/logs/exported-logs.tar.gz --directory ./workspace/logs ;; *) echo "Unknown option $1"