Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-10 12:10:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-10 12:10:04 +0300
commit67b0b1c43f3d705b92f62ef231dfce1d7f3c0a30 (patch)
treee5fe64819687cbc794f243a5166df59b3988ce36 /scripts/utils.sh
parentf9d25383cf2654e14741c46823417a1a4296ea82 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r--scripts/utils.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh
index 6486727c828..529491c3a0d 100644
--- a/scripts/utils.sh
+++ b/scripts/utils.sh
@@ -13,16 +13,18 @@ function retry() {
return 1
}
-function wait_for_url() {
+function test_url() {
local url="${1}"
local curl_output="${2}"
+ local status
- echo "Waiting for ${url}"
+ status=$(curl -s -o "${curl_output}" -L -w ''%{http_code}'' "${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}
+ if [[ $status == "200" ]]; then
+ return 0
+ fi
+
+ return 1
}
function bundle_install_script() {