diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-10 09:10:04 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-10 09:10:04 +0000 |
commit | 67b0b1c43f3d705b92f62ef231dfce1d7f3c0a30 (patch) | |
tree | e5fe64819687cbc794f243a5166df59b3988ce36 /scripts/utils.sh | |
parent | f9d25383cf2654e14741c46823417a1a4296ea82 (diff) | |
download | gitlab-ce-67b0b1c43f3d705b92f62ef231dfce1d7f3c0a30.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r-- | scripts/utils.sh | 14 |
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() { |