Make sure that retrieve script actually iterates

This commit is contained in:
Matt Pryor 2023-06-19 16:55:45 +01:00
parent c7e7b6eb86
commit 3a87df91a0

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -x
##### #####
# This script wraps sonobuoy retrieve with a retry # This script wraps sonobuoy retrieve with a retry
@ -11,12 +11,8 @@ set -e
retries=0 retries=0
retry_limit=20 retry_limit=20
while true; do
result_file=$(sonobuoy retrieve "$@") until sonobuoy retrieve "$@"; do
RC=$?
if [[ ${RC} -eq 0 ]]; then
break
fi
retries=$(( retries + 1 )) retries=$(( retries + 1 ))
if [[ ${retries} -eq ${retry_limit} ]]; then if [[ ${retries} -eq ${retry_limit} ]]; then
echo "Retries timed out. Check 'sonobuoy retrieve' command." echo "Retries timed out. Check 'sonobuoy retrieve' command."