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?
-
Changelog entry added, if necessary - [-] Documentation created/updated via this MR
- [-] Documentation reviewed by technical writer or follow-up review issue created
- [-] Tests added for this feature/bug
- [-] Tested in all supported browsers
-
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides - [-] Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process.
-
Security reports checked/validated by reviewer
Closes #59546 (closed)
Edited by 🤖 GitLab Bot 🤖