Skip to content

Fix Auto DevOps missing domain error handling

What does this MR do?

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.

This new bash logic should handle empty string better:

$ unset KUBE_INGRESS_BASE_DOMAIN

$ if [ -z ${KUBE_INGRESS_BASE_DOMAIN+x} ]; then echo 'It is unset!!!'; fi
It is unset!!!

$ KUBE_INGRESS_BASE_DOMAIN=''

$ if [ -z ${KUBE_INGRESS_BASE_DOMAIN+x} ]; then echo 'It is unset!!!'; fi

$ if [[ -z "$KUBE_INGRESS_BASE_DOMAIN" ]]; then echo 'It is unset!!!'; fi
It is unset!!!

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/59546

Does this MR meet the acceptance criteria?

Closes #59546 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading