From dc070ecae47a66fa4d9629c90d93f74955375af8 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Wed, 8 Jun 2016 12:46:38 -0700 Subject: [PATCH] try on fail Signed-off-by: Jess Frazelle --- build-all.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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