File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -102,20 +102,25 @@ while :; do
102102 I=$(( I+ 5 ))
103103 [ " $I " -lt 120 ] || fatal " timed out"
104104done
105- sleep 5
106105
107106# Get the token
108107log " Getting GitLab token..."
109- TOKEN_JSON=$(
110- try curl -s http://localhost:8080/api/v3/session \
111- -X POST \
112- --data " login=$LOGIN &password=$PASSWORD "
113- ) || exit 1
114- TOKEN=$(
115- pecho " ${TOKEN_JSON} " |
116- try python -c \
117- ' import sys, json; print(json.load(sys.stdin)["private_token"])'
118- ) || exit 1
108+ I=0
109+ while : ; do
110+ sleep 1
111+ TOKEN_JSON=$(
112+ try curl -s http://localhost:8080/api/v3/session \
113+ -X POST \
114+ --data " login=$LOGIN &password=$PASSWORD "
115+ ) > /dev/null 2>&1 || true
116+ TOKEN=$(
117+ pecho " ${TOKEN_JSON} " |
118+ try python -c \
119+ ' import sys, json; print(json.load(sys.stdin)["private_token"])'
120+ ) > /dev/null 2>&1 && break
121+ I=$(( I+ 1 ))
122+ [ " $I " -lt 20 ] || fatal " timed out"
123+ done
119124
120125cat > $CONFIG << EOF
121126[global]
You can’t perform that action at this time.
0 commit comments