From 3c5928f8470d7e1e8f8096912931e62ea5e0b275 Mon Sep 17 00:00:00 2001 From: Jordan McClintock Date: Wed, 7 Feb 2024 23:01:54 +0000 Subject: [PATCH] fix: task workaround and action update --- .github/actions/get-cluster-info/action.yaml | 4 ++++ tasks.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/get-cluster-info/action.yaml b/.github/actions/get-cluster-info/action.yaml index 949f8cf..cab3f9d 100644 --- a/.github/actions/get-cluster-info/action.yaml +++ b/.github/actions/get-cluster-info/action.yaml @@ -11,16 +11,20 @@ runs: - name: Get Pod Logs run: | + set +e kubectl get pods --all-namespaces -o custom-columns=NAME:.metadata.name,NAMESPACE:.metadata.namespace --no-headers | while read pod namespace; do kubectl logs --namespace=$namespace "$pod" > "cluster-info/${pod}.log" done + set -e shell: bash - name: Get Pod Descriptions run: | + set +e kubectl get pods --all-namespaces -o custom-columns=NAME:.metadata.name,NAMESPACE:.metadata.namespace --no-headers | while read pod namespace; do kubectl describe pod --namespace=$namespace "$pod" > "cluster-info/${pod}.desc" done + set -e shell: bash - uses: actions/upload-artifact@v4 diff --git a/tasks.yaml b/tasks.yaml index f4f698c..aaccd70 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -1,5 +1,5 @@ includes: - - cleanup: ./tasks/cleanup.yaml + - teardown: ./tasks/cleanup.yaml - create: ./tasks/create.yaml - deploy: ./tasks/deploy.yaml - setup: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/main/tasks/setup.yaml @@ -33,4 +33,4 @@ tasks: - name: cleanup actions: - - task: cleanup:destroy + - task: teardown:destroy