Remove the wait_for_review_app_to_be_accessible step from review-deploy

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2019-07-30 17:33:00 +02:00
parent ab509c7892
commit 8f501a74bd
No known key found for this signature in database
GPG key ID: 98DFFD1C0C62B70B
2 changed files with 1 additions and 27 deletions

View file

@ -101,8 +101,7 @@ schedule:review-build-cng:
- install_tiller - install_tiller
- install_external_dns - install_external_dns
- download_chart - download_chart
- deploy || display_deployment_debug - deploy || (display_deployment_debug && exit 1)
- wait_for_review_app_to_be_accessible
- add_license - add_license
artifacts: artifacts:
paths: [review_app_url.txt] paths: [review_app_url.txt]

View file

@ -340,31 +340,6 @@ function display_deployment_debug() {
fi fi
} }
function wait_for_review_app_to_be_accessible() {
echoinfo "Waiting for the Review App at ${CI_ENVIRONMENT_URL} to be accessible..." true
local interval=5
local elapsed_seconds=0
local max_seconds=$((2 * 60))
while true; do
local review_app_http_code
review_app_http_code=$(curl --silent --output /dev/null --max-time 5 --write-out "%{http_code}" "${CI_ENVIRONMENT_URL}/users/sign_in")
if [[ "${review_app_http_code}" -eq "200" ]] || [[ "${elapsed_seconds}" -gt "${max_seconds}" ]]; then
break
fi
let "elapsed_seconds+=interval"
sleep ${interval}
done
if [[ "${review_app_http_code}" -eq "200" ]]; then
echoinfo "The Review App at ${CI_ENVIRONMENT_URL} is ready after ${elapsed_seconds} seconds!"
else
echoerr "The Review App at ${CI_ENVIRONMENT_URL} isn't ready after ${max_seconds} seconds of polling..."
exit 1
fi
}
function add_license() { function add_license() {
if [ -z "${REVIEW_APPS_EE_LICENSE}" ]; then echo "License not found" && return; fi if [ -z "${REVIEW_APPS_EE_LICENSE}" ]; then echo "License not found" && return; fi