From 793d43d7c51de7f0d65d81f7a469f3f49771e4ed Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Thu, 24 Sep 2020 14:42:22 +0100 Subject: [PATCH] . --- .drone/scripts/initialise-image.sh | 5 +++++ .drone/scripts/login.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.drone/scripts/initialise-image.sh b/.drone/scripts/initialise-image.sh index 08adf61..2444c60 100644 --- a/.drone/scripts/initialise-image.sh +++ b/.drone/scripts/initialise-image.sh @@ -5,6 +5,11 @@ do && docker tag $2 $1$2 \ && docker push $1$2 && break # substitute your command here n=$((n+1)) + if [ $n ge 2 ]; then + echo "initialise failed" + exit 1 + fi + echo "retrying..$n" sleep 1 done diff --git a/.drone/scripts/login.sh b/.drone/scripts/login.sh index 314482d..3ef3b17 100644 --- a/.drone/scripts/login.sh +++ b/.drone/scripts/login.sh @@ -4,6 +4,11 @@ do docker login $1 --username client --password $2 \ && break # substitute your command here n=$((n+1)) + + if [ $n ge 2 ]; then + echo "login failed" + exit 1 + fi echo "retrying login..$n" sleep 1 done