From 91e856d6d536be630c768c91fd9e290c8bbcf4fe Mon Sep 17 00:00:00 2001 From: Marc Campbell Date: Fri, 12 Jun 2020 10:23:28 -0700 Subject: [PATCH] Add validation for collectors and support bundle in e2e --- .github/workflows/build-test-deploy.yaml | 35 +++++++++++++++++++ ...oubleshoot.yaml => sample-collectors.yaml} | 0 .../troubleshoot/sample-supportbundle.yaml | 7 ++++ 3 files changed, 42 insertions(+) rename examples/troubleshoot/{sample-troubleshoot.yaml => sample-collectors.yaml} (100%) create mode 100644 examples/troubleshoot/sample-supportbundle.yaml diff --git a/.github/workflows/build-test-deploy.yaml b/.github/workflows/build-test-deploy.yaml index 549bc4af..f4347fa8 100644 --- a/.github/workflows/build-test-deploy.yaml +++ b/.github/workflows/build-test-deploy.yaml @@ -58,6 +58,41 @@ jobs: - run: chmod +x bin/preflight - run: bin/preflight --interactive=false --format=json https://preflight.replicated.com + compile-supportbundle: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/setup-go@v1 + with: + go-version: '1.14' + - name: setup env + run: | + echo "::set-env name=GOPATH::$(go env GOPATH)" + echo "::add-path::$(go env GOPATH)/bin" + shell: bash + - uses: actions/checkout@master + - run: make support-bundle + - uses: actions/upload-artifact@v1 + with: + name: support-bundle + path: bin/support-bundle + + validate-supportbundle: + runs-on: ubuntu-latest + needs: compile-support-bundle + steps: + - name: Download support-bundle binary + uses: actions/download-artifact@v1 + with: + name: support-bundle + path: bin/ + - uses: engineerd/setup-kind@v0.2.0 + - run: chmod +x bin/support-bundle + - uses: actions/checkout@v1 + - run: bin/support-bundle ./examples/troubleshoot/sample-collectors.yaml + - run: bin/support-bundle ./examples/troubleshoot/sample-supportbundle.yaml + - run: bin/support-bundle https://kots.io + goreleaser: runs-on: ubuntu-latest needs: diff --git a/examples/troubleshoot/sample-troubleshoot.yaml b/examples/troubleshoot/sample-collectors.yaml similarity index 100% rename from examples/troubleshoot/sample-troubleshoot.yaml rename to examples/troubleshoot/sample-collectors.yaml diff --git a/examples/troubleshoot/sample-supportbundle.yaml b/examples/troubleshoot/sample-supportbundle.yaml new file mode 100644 index 00000000..44a1fc34 --- /dev/null +++ b/examples/troubleshoot/sample-supportbundle.yaml @@ -0,0 +1,7 @@ +apiVersion: troubleshoot.replicated.com/v1beta1 +kind: SupportBundle +metadata: + name: supportbundle-sample +spec: + collectors: [] + analyzers: [] \ No newline at end of file