Skip to content

Commit

Permalink
fix: e2e log collection download
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf committed Dec 12, 2024
1 parent c3db10a commit 9d0a17b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/e2e_aks_runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions packages/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9d0a17b

Please sign in to comment.