Skip to content

Commit

Permalink
Adding artifact names
Browse files Browse the repository at this point in the history
Adding artifact names for each collected log will help us understand which logs are suitable for each job.
In the end, we will be able to see links in the GitHub UI for all artifact names, and there, all the logs suitable for each job will be accessible.

Signed-off-by: shimritproj <[email protected]>
  • Loading branch information
shimritproj committed Nov 28, 2023
1 parent e47f9c1 commit 9e59136
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:
- name: Collect Logs
if: ${{ failure() }}
uses: ./.github/workflows/composite/collectlogs
with:
artifact-name: e2e

olm:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -139,6 +141,8 @@ jobs:
- name: Collect Logs
if: ${{ failure() }}
uses: ./.github/workflows/composite/collectlogs
with:
artifact-name: olm

upgrade_version:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -187,6 +191,8 @@ jobs:
- name: Collect Logs
if: ${{ failure() }}
uses: ./.github/workflows/composite/collectlogs
with:
artifact-name: upgrade_version

- name: Checkout Latest Metal LB Operator
uses: actions/checkout@v4
Expand Down Expand Up @@ -234,6 +240,8 @@ jobs:
- name: Collect Logs
if: ${{ failure() }}
uses: ./.github/workflows/composite/collectlogs
with:
artifact-name: upgrade_version

metallb_e2e:
runs-on: ubuntu-20.04
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/composite/collectlogs/action.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: "collectlogs"
description: "Collect and upload the logs"

inputs:
artifact-name:
description: "the name of artifacts to store"
required: true

runs:
using: "composite"
steps:
- name: Archive E2E Tests logs
uses: actions/upload-artifact@v2
with:
name: test_e2e_logs
name: ${{ inputs.artifact-name }}-e2e-logs
path: /tmp/test_e2e_logs/

- name: Export kind logs
Expand All @@ -18,5 +23,5 @@ runs:
- name: Archive kind logs
uses: actions/upload-artifact@v2
with:
name: kind_logs
name: ${{ inputs.artifact-name }}-kind-logs
path: /tmp/kind_logs

0 comments on commit 9e59136

Please sign in to comment.