From 91771b54bd393c9a794351c4b33e3544bc870b97 Mon Sep 17 00:00:00 2001 From: bowenlan-amzn Date: Sat, 30 Sep 2023 12:24:45 -0700 Subject: [PATCH 1/3] Update test workflows to increase readability Signed-off-by: bowenlan-amzn --- .../docker-security-test-workflow.yml | 20 ++++++++++++++++--- .../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, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-security-test-workflow.yml b/.github/workflows/docker-security-test-workflow.yml index 61727711f..3b7c47fb9 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: @@ -83,3 +83,17 @@ jobs: with: name: logs path: build/testclusters/integTest-*/logs/* + - name: Collect docker logs on failure + if: failure() + uses: jwalton/gh-docker-logs@v2 + with: + dest: './logs' + - name: Tar logs + if: failure() + run: tar cvzf ./logs.tgz ./logs + - name: Upload logs to GitHub + if: failure() + uses: actions/upload-artifact@v2 + 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 749044428..c4eb6cb76 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 7fe56adfb..36bce3ef5 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 33d32d12a..682342310 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 }}. From 85e9745e55a2094b5de6a161e06c17525241fbc8 Mon Sep 17 00:00:00 2001 From: bowenlan-amzn Date: Sat, 30 Sep 2023 18:08:13 -0700 Subject: [PATCH 2/3] Test if docker logs upload right Signed-off-by: bowenlan-amzn --- .github/workflows/docker-security-test-workflow.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/docker-security-test-workflow.yml b/.github/workflows/docker-security-test-workflow.yml index 3b7c47fb9..21d34a856 100644 --- a/.github/workflows/docker-security-test-workflow.yml +++ b/.github/workflows/docker-security-test-workflow.yml @@ -84,15 +84,12 @@ jobs: name: logs path: build/testclusters/integTest-*/logs/* - name: Collect docker logs on failure - if: failure() uses: jwalton/gh-docker-logs@v2 with: dest: './logs' - name: Tar logs - if: failure() run: tar cvzf ./logs.tgz ./logs - name: Upload logs to GitHub - if: failure() uses: actions/upload-artifact@v2 with: name: logs.tgz From 15755641dd67814044d953b7ec9e2c6c40a5ffa5 Mon Sep 17 00:00:00 2001 From: bowenlan-amzn Date: Sat, 30 Sep 2023 21:56:32 -0700 Subject: [PATCH 3/3] Add back if failure Signed-off-by: bowenlan-amzn --- .github/workflows/docker-security-test-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-security-test-workflow.yml b/.github/workflows/docker-security-test-workflow.yml index 21d34a856..4f1f3b9ae 100644 --- a/.github/workflows/docker-security-test-workflow.yml +++ b/.github/workflows/docker-security-test-workflow.yml @@ -91,6 +91,7 @@ jobs: 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