summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2019-03-27 09:40:24 +1100
committerDylan Griffith <dyl.griffith@gmail.com>2019-03-28 14:00:38 +1100
commit3c25ec8827d8db0f1232a55cde3640cc4275f672 (patch)
treeaacb7de3c59fdcc909e39e96135a757c2502f5cc /lib
parent5a2be4c8a548331df011e9de0bc77d7bbe48f700 (diff)
downloadgitlab-ce-3c25ec8827d8db0f1232a55cde3640cc4275f672.tar.gz
Fix Auto DevOps missing domain error handling
For some reason this value can be an empty string and we want to ensure that we correctly fail the job before a deploy. This is particularly problematic at the moment when coupled with https://gitlab.com/gitlab-org/gitlab-ce/issues/54760 as the user has no easy way to recover without destroying the cluster and starting over.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
index 7ec786b6d5d..78872b3bbe3 100644
--- a/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml
@@ -856,7 +856,7 @@ rollout 100%:
function check_kube_domain() {
ensure_kube_ingress_base_domain
- if [ -z ${KUBE_INGRESS_BASE_DOMAIN+x} ]; then
+ if [[ -z "$KUBE_INGRESS_BASE_DOMAIN" ]]; then
echo "In order to deploy or use Review Apps,"
echo "AUTO_DEVOPS_DOMAIN or KUBE_INGRESS_BASE_DOMAIN variables must be set"
echo "From 11.8, you can set KUBE_INGRESS_BASE_DOMAIN in cluster settings"