From 3db3af91f5200febb71473b47fa855e3ee31792a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Va=C5=A1ek?= Date: Thu, 23 May 2024 17:45:51 +0200 Subject: [PATCH] chore: cluster log (#2321) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Save logs as an GH artifact Signed-off-by: Matej VaĊĦek --- .github/workflows/test-integration.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml index 06e3a883..2a9bf288 100644 --- a/.github/workflows/test-integration.yaml +++ b/.github/workflows/test-integration.yaml @@ -46,13 +46,20 @@ jobs: - name: Dump Cluster Logs if: always() run: | - echo "::group::cluster events" - kubectl get events -A - echo "::endgroup::" + echo "::group::cluster events" >> cluster_log.txt + kubectl get events -A >> cluster_log.txt 2>&1 + echo "::endgroup::" >> cluster_log.txt - echo "::group::cluster containers logs" - stern '.*' --all-namespaces --no-follow - echo "::endgroup::" + echo "::group::cluster containers logs" >> cluster_log.txt + stern '.*' --all-namespaces --no-follow >> cluster_log.txt 2>&1 + echo "::endgroup::" >> cluster_log.txt + - name: "Archive log results" + if: always() + uses: actions/upload-artifact@v4 + with: + name: cluster-logs + path: ./cluster_log.txt + retention-days: 7 - uses: codecov/codecov-action@v4 with: files: ./coverage.txt