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
94271657
Commit
94271657
authored
Jun 09, 2021
by
Albert Salim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify deployment is successful
parent
7234f19d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
.gitlab/ci/review.gitlab-ci.yml
.gitlab/ci/review.gitlab-ci.yml
+4
-1
scripts/review_apps/review-apps.sh
scripts/review_apps/review-apps.sh
+14
-0
No files found.
.gitlab/ci/review.gitlab-ci.yml
View file @
94271657
...
...
@@ -71,13 +71,16 @@ review-deploy:
-
download_chart
-
date
-
deploy || (display_deployment_debug && exit 1)
-
verify_deploy || exit
1
-
disable_sign_ups || (delete_release && exit 1)
after_script
:
# Run seed-dast-test-data.sh only when DAST_RUN is set to true. This is to pupulate review app with data for DAST scan.
# Set DAST_RUN to true when jobs are manually scheduled.
-
if [ "$DAST_RUN" == "true" ]; then source scripts/review_apps/seed-dast-test-data.sh; TRACE=1 trigger_proj_user_creation; fi
artifacts
:
paths
:
[
environment_url.txt
]
paths
:
-
environment_url.txt
-
curl_output.txt
expire_in
:
7 days
when
:
always
...
...
scripts/review_apps/review-apps.sh
View file @
94271657
...
...
@@ -365,6 +365,20 @@ EOF
eval
"
${
HELM_CMD
}
"
}
function
verify_deploy
()
{
echoinfo
"Verifying deployment at
${
CI_ENVIRONMENT_URL
}
"
local
status
=
$(
curl
-sL
-w
"%{http_code}
\\
n"
"
${
CI_ENVIRONMENT_URL
}
"
-o
curl_output.txt
)
if
[[
$status
==
'200'
]]
;
then
echoinfo
"Review app is deployed to
${
CI_ENVIRONMENT_URL
}
"
return
0
else
echoerr
"Review app is not available at
${
CI_ENVIRONMENT_URL
}
. See curl_output.txt artifact for detail."
return
1
fi
}
function
display_deployment_debug
()
{
local
namespace
=
"
${
CI_ENVIRONMENT_SLUG
}
"
local
release
=
"
${
CI_ENVIRONMENT_SLUG
}
"
...
...
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