diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-09 09:10:18 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-09 09:10:18 +0000 |
commit | 82a546b14c7613fe355b3e68c425d5da8779641a (patch) | |
tree | b7bce66a952a66375e0e4eeb8cbedc38c9479ebf /scripts/utils.sh | |
parent | a5628d3b6d9b74f5902f790ceddd6374148c9d71 (diff) | |
download | gitlab-ce-82a546b14c7613fe355b3e68c425d5da8779641a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r-- | scripts/utils.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh index d4436e1171d..6486727c828 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -13,6 +13,18 @@ function retry() { return 1 } +function wait_for_url() { + local url="${1}" + local curl_output="${2}" + + echo "Waiting for ${url}" + + timeout -s 1 60 bash -c \ + 'while [[ "$(curl -s -o ${1} -L -w ''%{http_code}'' ${0})" != "200" ]]; \ + do echo "." && sleep 5; \ + done' ${url} ${curl_output} +} + function bundle_install_script() { local extra_install_args="${1}" |