mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
make wget in gen-swagger-doc more resilient
This commit is contained in:
parent
f99cc645bb
commit
237f4451b6
@ -22,7 +22,15 @@ set -o pipefail
|
||||
|
||||
cd /build
|
||||
|
||||
wget "$2" -O register.go
|
||||
# wget doesn't retry on 503, so adding a loop to make it more resilient.
|
||||
for i in {1..3}; do
|
||||
if wget "$2" -O register.go; then
|
||||
break
|
||||
fi
|
||||
if [ $i -eq 3 ]; then
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# gendocs takes "input.json" as the input swagger spec.
|
||||
cp /swagger-source/"$1".json input.json
|
||||
|
Loading…
Reference in New Issue
Block a user