From ed49265489ded63e4ad481907d9aeadaf50d4f1c Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Thu, 30 Nov 2023 10:20:41 -0500 Subject: [PATCH] add support-bundle tests to e2e suite (#4184) * add support-bundle tests to e2e suite * add job to PR workflow --- .github/workflows/build-test.yaml | 42 +++++++++++++++++++++++++++++++ e2e/e2e_test.go | 1 + e2e/testim/inventory/inventory.go | 9 +++++++ 3 files changed, 52 insertions(+) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 42a8ad82fe..aaff70da45 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -3850,6 +3850,47 @@ jobs: cluster-id: ${{ steps.create-cluster.outputs.cluster-id }} + validate-support-bundle: + runs-on: ubuntu-20.04 + needs: [ enable-tests, can-run-ci, build-push-kotsadm-image, build-e2e, build-kurl-proxy, build-migrations, push-minio, push-rqlite ] + strategy: + fail-fast: false + matrix: + cluster: [ + {distribution: kind, version: v1.28.0}, + {distribution: openshift, version: 4.13.0-okd} + ] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: download e2e deps + uses: actions/download-artifact@v3 + with: + name: e2e + path: e2e/bin/ + - run: docker load -i e2e/bin/e2e-deps.tar + - run: chmod +x e2e/bin/* + - name: download kots binary + uses: actions/download-artifact@v3 + with: + name: kots + path: bin/ + - run: chmod +x bin/* + - uses: ./.github/actions/kots-e2e + with: + test-focus: 'Support Bundle' + kots-namespace: 'support-bundle' + k8s-distribution: ${{ matrix.cluster.distribution }} + k8s-version: ${{ matrix.cluster.version }} + testim-access-token: '${{ secrets.TESTIM_ACCESS_TOKEN }}' + testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }} + aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}' + aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}' + replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}' + kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}' + kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}' + + validate-pr-tests: runs-on: ubuntu-20.04 needs: @@ -3872,6 +3913,7 @@ jobs: - validate-multi-app-install - validate-airgap-smoke-test - validate-config + - validate-support-bundle # non-testim tests - validate-minimal-rbac - validate-minimal-rbac-override diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index c76d51e53a..401edb95d1 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -220,6 +220,7 @@ var _ = Describe("E2E", func() { Entry(nil, inventory.NewRangeKotsVersion()), Entry(nil, inventory.NewMultiAppBackupAndRestoreTest()), Entry(nil, inventory.MultiAppTest()), + Entry(nil, inventory.NewSupportBundle()), ) }) diff --git a/e2e/testim/inventory/inventory.go b/e2e/testim/inventory/inventory.go index 96ad5ee56c..961ac7eb1e 100644 --- a/e2e/testim/inventory/inventory.go +++ b/e2e/testim/inventory/inventory.go @@ -163,6 +163,15 @@ func NewRangeKotsVersion() Test { } } +func NewSupportBundle() Test { + return Test{ + Name: "Support Bundle", + Suite: "support-bundle", + Namespace: "support-bundle", + UpstreamURI: "support-bundle-halibut/automated", + } +} + func SetupRegressionTest(kubectlCLI *kubectl.CLI) TestimParams { cmd := kubectlCLI.Command( context.Background(),