File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,18 @@ jobs:
53
53
54
54
- name : Export logs
55
55
if : ${{ failure() }}
56
+ shell : bash
56
57
run : |
57
58
kind export logs --name ess-helm ./ess-helm-logs
58
59
kind export kubeconfig --name ess-helm
59
60
ns=$(kubectl --context kind-ess-helm get ns -l app.kubernetes.io/managed-by=pytest -o jsonpath='{.items[].metadata.name}')
60
- kubectl --context kind-ess-helm get deployments -o yaml -n $ns > ./ess-helm-logs/deployments.txt
61
- kubectl --context kind-ess-helm get statefulsets -o yaml -n $ns > ./ess-helm-logs/statefulsets.txt
62
- kubectl --context kind-ess-helm get pods -o yaml -n $ns > ./ess-helm-logs/pods.txt
63
- kubectl --context kind-ess-helm get secrets -o yaml -n $ns > ./ess-helm-logs/secrets.txt
64
- kubectl --context kind-ess-helm get configmaps -o yaml -n $ns > ./ess-helm-logs/configmaps.txt
61
+ resources=("pods" "deployments" "statefulsets" "services" "configmaps" "secrets" "ingresses" "persistentvolumes" "persistentvolumeclaims")
62
+ for i in "${resources[@]}"; do
63
+ kubectl --context kind-ess-helm get $i -n $ns > ./ess-helm-logs/$i.txt
64
+ echo "----" >> ./ess-helm-logs/$i.txt
65
+ kubectl --context kind-ess-helm get $i -o yaml -n $ns >> ./ess-helm-logs/$i.txt
66
+ done
67
+ kubectl --context kind-ess-helm get events --sort-by=.metadata.creationTimestamp -n $ns > ./ess-helm-logs/events.txt
65
68
kind delete cluster --name ess-helm
66
69
67
70
- name : Upload logs
You can’t perform that action at this time.
0 commit comments