Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload support bundles of e2e tests as Github artifacts #4621

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/actions/generate-support-bundle/action.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
name: 'Generate Support Bundle'
description: 'Composite action for generating a support bundle'
inputs:
aws-access-key-id:
description: 'AWS access key id for uploading support bundle'
artifact-name:
description: 'Name of the artifact to be uploaded'
required: true
aws-secret-access-key:
description: 'AWS secret access key for uploading support bundle'
required: true
aws-region:
description: 'AWS region for uploading support bundle'
default: 'us-east-1'
required: false
kots-namespace:
description: 'KOTS namespace'
required: true
runs:
using: "composite"
steps:
- name: Generate support bundle on failure
- id: generate-support-bundle
env:
AWS_ACCESS_KEY_ID: ${{ inputs.aws-access-key-id }}
AWS_SECRET_ACCESS_KEY: ${{ inputs.aws-secret-access-key }}
AWS_DEFAULT_REGION: ${{ inputs.aws-region }}
KOTS_NAMESPACE: ${{ inputs.kots-namespace }}
run: |
RELEASE="$(
Expand All @@ -33,6 +23,16 @@ runs:
tar xzf support-bundle_linux_amd64.tar.gz
./support-bundle https://kots.io
BUNDLE="$(ls -1 | grep 'support-bundle-.*.tar.gz')"
aws s3 cp "${BUNDLE}" "s3://kots-e2e-build-test-support-bundles/${BUNDLE}"
echo "::notice ::support bundle uploaded to aws replicated-dev account s3://kots-e2e-build-test-support-bundles/${BUNDLE}"
echo "bundle-name=$BUNDLE" >> "$GITHUB_OUTPUT"
shell: bash

- id: upload-support-bundle
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: ${{ steps.generate-support-bundle.outputs.bundle-name }}

- name: Print support bundle URL
shell: bash
run: |
echo "::notice ::support bundle can be downloaded from: ${{ steps.upload-support-bundle.outputs.artifact-url }}"
16 changes: 2 additions & 14 deletions .github/actions/kots-e2e/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,6 @@ inputs:
description: 'Run KOTS with the --airgap flag'
default: "false"
required: false
aws-access-key-id:
description: 'AWS access key id for uploading support bundle'
required: false
aws-secret-access-key:
description: 'AWS secret access key for uploading support bundle'
required: false
aws-region:
description: 'AWS region for uploading support bundle'
default: 'us-east-1'
required: false
replicated-api-token:
description: 'Replicated API token for C11y matrix'
required: false
Expand Down Expand Up @@ -171,12 +161,10 @@ runs:
shell: bash

- name: Generate support bundle on failure
if: ${{ failure() && inputs.aws-access-key-id && inputs.aws-secret-access-key }}
if: ${{ failure() }}
uses: ./.github/actions/generate-support-bundle
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: ${{ inputs.aws-region }}
artifact-name: ${{ github.job }}-${{ inputs.k8s-distribution }}-${{ inputs.k8s-version }}-support-bundle

- name: Remove Cluster
id: remove-cluster
Expand Down
Loading
Loading