summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2020-02-24 13:59:02 +0100
committerGitHub <noreply@github.com>2020-02-24 13:59:02 +0100
commit2b3871d85e0f875edacc8eea5542df4d1f4c66f0 (patch)
tree713260e14449945f210946c2ae5d550cdcbea07d
parentf071390dadc4422c7d3cf77171334a617cfd9908 (diff)
parent3834d9cf800a0659433eb640cb3b63a947f0ebda (diff)
downloadgitlab-2b3871d85e0f875edacc8eea5542df4d1f4c66f0.tar.gz
Merge pull request #1023 from nejch/perf/wait-gitlab-reconfigure
perf: wait for gitlab to reconfigure instead of using hardcoded sleep
-rwxr-xr-xtools/build_test_env.sh11
1 files changed, 2 insertions, 9 deletions
diff --git a/tools/build_test_env.sh b/tools/build_test_env.sh
index f5feebf..7a3fc23 100755
--- a/tools/build_test_env.sh
+++ b/tools/build_test_env.sh
@@ -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)