Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b95eca3f
Commit
b95eca3f
authored
Jun 10, 2021
by
Albert Salim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use retry for testing URL
parent
9126b090
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
scripts/review_apps/review-apps.sh
scripts/review_apps/review-apps.sh
+1
-1
scripts/utils.sh
scripts/utils.sh
+8
-6
No files found.
scripts/review_apps/review-apps.sh
View file @
b95eca3f
...
...
@@ -367,7 +367,7 @@ EOF
function
verify_deploy
()
{
echoinfo
"Verifying deployment at
${
CI_ENVIRONMENT_URL
}
"
if
wait_for_url
"
${
CI_ENVIRONMENT_URL
}
"
curl_output.txt
;
then
if
retry
"test_url
\"
${
CI_ENVIRONMENT_URL
}
\"
curl_output.txt"
;
then
echoinfo
"Review app is deployed to
${
CI_ENVIRONMENT_URL
}
"
return
0
else
...
...
scripts/utils.sh
View file @
b95eca3f
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment