diff --git a/build-all.sh b/build-all.sh index e7b5fa6..0da4364 100755 --- a/build-all.sh +++ b/build-all.sh @@ -30,7 +30,15 @@ for f in "${files[@]}"; do echo "Successfully built ${base}:${suite} with context ${build_dir}" echo " --- " - docker push --disable-content-trust=false r.j3ss.co/${base}:${suite} + # try push a few times because notary server sometimes returns 401 for + # absolutely no reason + n=0 + until [ $n -ge 5 ]; do + docker push --disable-content-trust=false r.j3ss.co/${base}:${suite} && break + echo "Try #$n failed... sleeping for 15 seconds" + n=$[$n+1] + sleep 15 + done # also push the tag latest for "stable" tags if [[ "$suite" == "stable" ]]; then