Files
my-rook-config/.github/workflows/collect-logs/action.yaml
T
Workflow config file is invalid. Please check your config file: invalid jobs: input node is not a mapping node
Blaine Gardner 3e76de7868 ci: allow canary jobs to have ids for nightly suite
For nightly jobs, canary tests are all running with the same job IDs,
making the last-run jobs cancel previous runs. Add a workflow-id
parameter to canary jobs that can be used to give each job in a canary
suite a unique job ID to prevent this.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-02-14 11:04:40 -07:00

42 lines
1.3 KiB
YAML

# This isn't to be used for the go integration tests because their logs are placed in a different location and require few extra steps.
name: Log Collector
description: Log collector for canary test
inputs:
name:
description: Name to use for the workflow
required: true
additional-namespace:
description: Additional namespace to collect
required: false
runs:
using: "composite"
steps:
- name: sanitize input name
id: sanitize
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
raw="${{ inputs.name }}"
no_colon="${raw//:/-}"
no_slash="${no_colon////-}"
# echo to $GITHUB_OUTPUT doesn't work in composite steps:
# https://github.com/actions/runner/issues/2009#issuecomment-1793565031
echo "ARTIFACT_NAME=${no_slash}" >> $GITHUB_ENV
- name: collect common logs
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
export ADDITIONAL_NAMESPACE="${{ inputs.additional-namespace }}"
tests/scripts/collect-logs.sh
- name: log artifact name
shell: bash --noprofile --norc -eo pipefail {0}
run: |
echo ${{ env.ARTIFACT_NAME }}
- name: Upload canary test result
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: test