Use the retry script for sonobuoy retrieve
This commit is contained in:
parent
d32e864535
commit
04d550899b
2
.github/actions/upgrade-and-test/action.yml
vendored
2
.github/actions/upgrade-and-test/action.yml
vendored
@ -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
|
||||
|
||||
|
1
.github/workflows/test.yaml
vendored
1
.github/workflows/test.yaml
vendored
@ -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
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user