From 5ee2f7469935304fa40e72c1ba076dd8ebc46179 Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Thu, 22 Oct 2020 17:03:53 +0100 Subject: [PATCH] . --- .drone/scripts/login.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .drone/scripts/login.sh diff --git a/.drone/scripts/login.sh b/.drone/scripts/login.sh new file mode 100644 index 0000000..cc1af90 --- /dev/null +++ b/.drone/scripts/login.sh @@ -0,0 +1,13 @@ +n=0 +while : +do + docker login $1 --username client --password "$2" \ + && break # substitute your command here + n=$((n+1)) + if [ $n -ge 10 ]; then + echo "login failed" + exit 1 + fi + echo "retrying login..$n" + sleep 5 +done