Skip to content
代码片段 群组 项目
提交 4f396394 编辑于 作者: Lin Jen-Shin's avatar Lin Jen-Shin
浏览文件

Merge branch '355731-remove_curl_output_file' into 'master'

Move cURL output to the job output

See merge request gitlab-org/gitlab!85488
No related branches found
No related tags found
无相关合并请求
......@@ -111,7 +111,6 @@ review-deploy:
artifacts:
paths:
- environment_url.txt
- curl_output.txt
expire_in: 7 days
when: always
......
......@@ -359,11 +359,11 @@ EOF
function verify_deploy() {
echoinfo "Verifying deployment at ${CI_ENVIRONMENT_URL}"
if retry "test_url \"${CI_ENVIRONMENT_URL}\" curl_output.txt"; then
if retry "test_url \"${CI_ENVIRONMENT_URL}\""; 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."
echoerr "Review app is not available at ${CI_ENVIRONMENT_URL}: see the logs from cURL above for more details"
return 1
fi
}
......
......@@ -15,16 +15,18 @@ function retry() {
function test_url() {
local url="${1}"
local curl_output="${2}"
local status
status=$(curl -s -o "${curl_output}" -L -w ''%{http_code}'' "${url}")
status=$(curl --output /dev/null -L -s -w ''%{http_code}'' "${url}")
if [[ $status == "200" ]]; then
return 0
else
# We display the error in the job to allow for better debugging
curl -L --fail --output /dev/null "${url}"
echo -e "\nExpected HTTP status 200: received ${status}\n"
return 1
fi
return 1
}
function bundle_install_script() {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册