Skip to content

perf: wait for gitlab to reconfigure instead of using hardcoded sleep #1023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions tools/build_test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,20 +141,13 @@ while :; do
sleep 1
docker top gitlab-test >/dev/null 2>&1 || fatal "docker failed to start"
sleep 4
# last command started by the container is "gitlab-ctl tail"
docker exec gitlab-test pgrep -f 'gitlab-ctl tail' &>/dev/null \
&& docker exec gitlab-test curl http://localhost/-/health 2>/dev/null \
| grep -q 'GitLab OK' \
&& curl -s http://localhost:8080/users/sign_in 2>/dev/null \
| grep -q "GitLab Community Edition" \
docker logs gitlab-test 2>&1 | grep "gitlab Reconfigured!" \
&& break
I=$((I+5))
log "Waiting for GitLab to reconfigure.. (${I}s)"
[ "$I" -lt 180 ] || fatal "timed out"
done

log "Pausing to give GitLab some time to finish starting up..."
sleep 200

# Get the token
TOKEN=$($(dirname $0)/generate_token.py)

Expand Down