fix shellcheck failures list-resources.sh

update pull request

update pull request

update pull request
k3s-v1.15.3
aaa 2019-04-19 20:03:29 -04:00
parent 20b76a2b4a
commit c4898d6f56
2 changed files with 4 additions and 5 deletions

View File

@ -49,20 +49,20 @@ function gcloud-list() {
local attempt=1
local result=""
while true; do
if result=$(gcloud ${group} ${resource} list --project=${PROJECT} ${filter:+--filter="$filter"} ${@:4}); then
if [[ ! -z "${GREP_REGEX}" ]]; then
if result=$(gcloud "${group}" "${resource}" list --project="${PROJECT}" "${filter:+--filter="$filter"}" "${@:4}"); then
if [[ -n "${GREP_REGEX:-}" ]]; then
result=$(echo "${result}" | grep "${GREP_REGEX}" || true)
fi
echo "${result}"
return
fi
echo -e "Attempt ${attempt} failed to list ${resource}. Retrying." >&2
attempt=$(($attempt+1))
attempt=$((attempt + 1))
if [[ ${attempt} -gt 5 ]]; then
echo -e "List ${resource} failed!" >&2
exit 2
fi
sleep $((5*${attempt}))
sleep $((5 * attempt))
done
}

View File

@ -11,7 +11,6 @@
./cluster/gce/gci/flexvolume_node_setup.sh
./cluster/gce/gci/health-monitor.sh
./cluster/gce/gci/master-helper.sh
./cluster/gce/list-resources.sh
./cluster/gce/upgrade-aliases.sh
./cluster/gce/upgrade.sh
./cluster/gce/util.sh