diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 969ce96980f2c84159be1d622f513768310b5d66..17f1f1ed92e382dce5fb662d3c4c4bdbe968fdd2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -include: +include: - project: gitlab-ci/semantic-release ref: v1 file: semantic-release-base.yml diff --git a/includes/verify.yml b/includes/verify.yml index 880a5737bee3b682ebd83bf3bd4a95422eb73a63..60507ec9a038344d3605330917a2683cb3567c86 100644 --- a/includes/verify.yml +++ b/includes/verify.yml @@ -6,9 +6,9 @@ return 1 } - statusIs200 () { + statusIsNot503 () { statusCode=$(curl --write-out '%{http_code}' --silent --output /dev/null $CI_ENVIRONMENT_URL) - if [[ "$statusCode" == "200" ]]; then return 0; fi + if [[ "$statusCode" != "503" ]]; then return 0; fi echo "statuscode is $statusCode" return 1 } @@ -17,7 +17,7 @@ counter=0 echo "check if new version has been deployed successfully" echo "checking $CI_ENVIRONMENT_URL" - until buildIdMatches && statusIs200 + until buildIdMatches && statusIsNot503 do sleep 1 [[ counter -eq $max_retry ]] && echo "Failed!"" && exit 1