diff --git a/.github/actions/upgrade-and-test/action.yml b/.github/actions/upgrade-and-test/action.yml index 2b12285..1dc400b 100644 --- a/.github/actions/upgrade-and-test/action.yml +++ b/.github/actions/upgrade-and-test/action.yml @@ -107,7 +107,7 @@ runs: - name: Retrieve sonobuoy results shell: bash - run: sonobuoy retrieve --filename ./sonobuoy-results-${{ inputs.name }}.tar.gz + run: ./scripts/sonobuoy-retrieve.sh --filename ./sonobuoy-results-${{ inputs.name }}.tar.gz env: KUBECONFIG: ./kubeconfig diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 042c42e..b1f7d32 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -165,7 +165,6 @@ jobs: name: ci-${{ github.run_id }}-kube-1-24 kubernetes-version: ${{ fromJson(inputs.images).kube-1-24-version }} image-id: ${{ fromJson(inputs.images).kube-1-24-image }} - sonobuoy-full: false if: ${{ !github.event.pull_request.draft }} - name: Delete Kubernetes 1.24 deployment diff --git a/scripts/sonobuoy-artifacts.sh b/scripts/sonobuoy-retrieve.sh similarity index 69% rename from scripts/sonobuoy-artifacts.sh rename to scripts/sonobuoy-retrieve.sh index aaf0419..52c62f0 100755 --- a/scripts/sonobuoy-artifacts.sh +++ b/scripts/sonobuoy-retrieve.sh @@ -1,10 +1,19 @@ #!/bin/bash -set -x + +set -e + +##### +# This script wraps sonobuoy retrieve with a retry +# +# https://github.com/vmware-tanzu/sonobuoy/issues/1633#issuecomment-1112667471 +##### + + retries=0 retry_limit=20 while true; do - result_file=$(sonobuoy retrieve) + result_file=$(sonobuoy retrieve "$@") RC=$? if [[ ${RC} -eq 0 ]]; then break @@ -17,7 +26,3 @@ while true; do echo "Error retrieving results. Waiting ${STATUS_INTERVAL_SEC}s to retry...[${retries}/${retry_limit}]" sleep "${STATUS_INTERVAL_SEC}" done - -#mkdir ./results && tar xzf $result_file -C ./results - -sonobuoy results $result_file --mode=detailed > results.txt