File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed
Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -328,8 +328,18 @@ _download-kubectl: _create-out-dir
328328 set -euxo pipefail
329329 [ -z ` which kubectl ` ] || [ {{ REFRESH_BIN}} != " 0" ] || exit 0
330330 cd {{ OUT_DIR}}
331- curl -LO " https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/{{ ARCH}} /kubectl"
332- chmod + x kubectl
331+ retries=3
332+ while ((retries > 0)); do
333+ if curl -LO " https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/{{ ARCH}} /kubectl" ; then
334+ chmod + x kubectl
335+ exit 0
336+ fi
337+ ((retries --))
338+ sleep 10 s
339+ done
340+ echo " Failed to install kubectl"
341+ exit 1
342+
333343
334344[private ]
335345[macos ]
@@ -338,5 +348,15 @@ _download-kubectl: _create-out-dir
338348 set -euxo pipefail
339349 [ -z ` which kubectl ` ] || [ {{ REFRESH_BIN}} != " 0" ] || exit 0
340350 cd {{ OUT_DIR}}
341- curl -LO " https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/{{ ARCH}} /kubectl"
342- chmod + x kubectl
351+ retries=3
352+ while ((retries > 0)); do
353+ if curl -LO " https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/{{ ARCH}} /kubectl" ; then
354+ chmod + x kubectl
355+ exit 0
356+ fi
357+ ((retries --))
358+ sleep 10 s
359+ done
360+ echo " Failed to install kubectl"
361+ exit 1
362+
You can’t perform that action at this time.
0 commit comments