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