From 4c05b1fcd998cb6e7444ced8aad00d3e8000efc2 Mon Sep 17 00:00:00 2001 From: Morten Torkildsen Date: Sun, 19 Feb 2023 00:37:15 +0000 Subject: [PATCH] Archive Porch server logs in GitHub Actions --- .github/workflows/porch-e2e.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/porch-e2e.yml b/.github/workflows/porch-e2e.yml index 1491c9a55b..51eb0bd40f 100644 --- a/.github/workflows/porch-e2e.yml +++ b/.github/workflows/porch-e2e.yml @@ -99,3 +99,18 @@ jobs: working-directory: ./porch/test/e2e - name: Porch CLI e2e test run: make test-porch + - name: List pods in porch-system + if: always() + run: | + kubectl -n porch-system get pod + - name: porch e2e logs + if: always() + run: | + name=$(kubectl -n porch-system get pod -l app=porch-server -o custom-columns=NAME:.metadata.name --no-headers=true) + kubectl -n porch-system logs $name > porch-e2e-server.log + - name: Archive logs + if: always() + uses: actions/upload-artifact@v3 + with: + name: porch-e2e-server.log + path: porch-e2e-server.log