Commit 70ff0bda authored by Fabio Yeon's avatar Fabio Yeon

Merge pull request #20201 from caesarxuchao/resilient-wget

make wget in gen-swagger-doc more resilient
parents a89607f8 237f4451
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment