ghost/.drone/scripts/login.sh

14 lines
246 B
Bash
Raw Normal View History

2020-09-25 08:11:19 +00:00
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