mirror of
https://github.com/goharbor/harbor
synced 2025-04-06 20:24:58 +00:00
Retry when test ldap server load data fail
This commit is contained in:
parent
0abd30f9f4
commit
2c2f97a3be
|
@ -14,3 +14,15 @@ sleep 5
|
|||
docker cp ldap_test.ldif ldap_server:/
|
||||
docker exec ldap_server ldapadd -x -D "cn=admin,dc=example,dc=com" -w admin -f /ldap_test.ldif -ZZ
|
||||
|
||||
# failed and retry
|
||||
for number in {1..10}
|
||||
do
|
||||
if [ ! $? -eq 0 ]; then
|
||||
sleep 6
|
||||
echo "retry in $number "
|
||||
docker exec ldap_server ldapadd -x -D "cn=admin,dc=example,dc=com" -w admin -f /ldap_test.ldif -ZZ
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
exit 1
|
Loading…
Reference in New Issue
Block a user