From e5a24df54cab8329c892853345b36df88098a352 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 16:51:38 -0700 Subject: [PATCH] Upload docker test cluster log (#964) (#975) * Update test workflows to increase readability * Test if docker logs upload right * Add back if failure --------- (cherry picked from commit a9ad1f6cb0a201ca8bd4936149f83b0abaab5f61) Signed-off-by: bowenlan-amzn Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../docker-security-test-workflow.yml | 18 +++++++++++++++--- .github/workflows/multi-node-test-workflow.yml | 6 +++--- .github/workflows/security-test-workflow.yml | 6 +++--- .github/workflows/test-and-build-workflow.yml | 6 +++--- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-security-test-workflow.yml b/.github/workflows/docker-security-test-workflow.yml index 57d1e8b13..ee880366c 100644 --- a/.github/workflows/docker-security-test-workflow.yml +++ b/.github/workflows/docker-security-test-workflow.yml @@ -2,13 +2,13 @@ name: Docker Security Test Workflow on: pull_request: branches: - - "*" + - "**" push: branches: - - "*" + - "**" jobs: - test: + docker-test: # This job runs on Linux runs-on: ubuntu-latest steps: @@ -81,3 +81,15 @@ jobs: with: name: logs path: build/testclusters/integTest-*/logs/* + - name: Collect docker logs on failure + uses: jwalton/gh-docker-logs@v2 + with: + dest: './logs' + - name: Tar logs + run: tar cvzf ./logs.tgz ./logs + - name: Upload logs to GitHub + uses: actions/upload-artifact@v2 + if: failure() + with: + name: logs.tgz + path: ./logs.tgz diff --git a/.github/workflows/multi-node-test-workflow.yml b/.github/workflows/multi-node-test-workflow.yml index aaa37dc98..fe5f0691f 100644 --- a/.github/workflows/multi-node-test-workflow.yml +++ b/.github/workflows/multi-node-test-workflow.yml @@ -3,13 +3,13 @@ name: Multi node test workflow on: pull_request: branches: - - "*" + - "**" push: branches: - - "*" + - "**" jobs: - test: + multi-node-test: # This job runs on Linux runs-on: ubuntu-latest steps: diff --git a/.github/workflows/security-test-workflow.yml b/.github/workflows/security-test-workflow.yml index d0bee3874..8f4dae924 100644 --- a/.github/workflows/security-test-workflow.yml +++ b/.github/workflows/security-test-workflow.yml @@ -3,13 +3,13 @@ name: Security test workflow on: pull_request: branches: - - "*" + - "**" push: branches: - - "*" + - "**" jobs: - test: + security-test: # This job runs on Linux runs-on: ubuntu-latest steps: diff --git a/.github/workflows/test-and-build-workflow.yml b/.github/workflows/test-and-build-workflow.yml index d324148e8..f54ad9b0b 100644 --- a/.github/workflows/test-and-build-workflow.yml +++ b/.github/workflows/test-and-build-workflow.yml @@ -2,13 +2,13 @@ name: Test and Build Workflow on: pull_request: branches: - - "*" + - "**" push: branches: - - "*" + - "**" jobs: - build: + test-and-build: env: BUILD_ARGS: ${{ matrix.os_build_args }} WORKING_DIR: ${{ matrix.working_directory }}.