summaryrefslogtreecommitdiff
path: root/scripts/utils.sh
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-09 09:10:18 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-09 09:10:18 +0000
commit82a546b14c7613fe355b3e68c425d5da8779641a (patch)
treeb7bce66a952a66375e0e4eeb8cbedc38c9479ebf /scripts/utils.sh
parenta5628d3b6d9b74f5902f790ceddd6374148c9d71 (diff)
downloadgitlab-ce-82a546b14c7613fe355b3e68c425d5da8779641a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r--scripts/utils.sh12
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}"