Auto DevOps is trying to deploy without a base domain set
Summary
Auto DevOps is trying to perform a deploy without setting the base domain.
Steps to reproduce
Steps to reproduce:
- Get a working auto devops project
- Clear out the domain setting in
Operations > Kubernetes > <cluster name>
- Run the pipeline
Notice there is an error that says the hostnames are invalid during the helm deployment. It should not have even gotten this far because we're meant to be checking the domain variable is set and cancelling before we even get to the deployment.
Example Project
I created a minimal CI YML that should be erroring out because the variables are not set but the pipelines run. Confirming my hypothesis.
https://gitlab.com/DylanGriffith/test-missing-ado-domain/blob/master/.gitlab-ci.yml
What is the current bug behavior?
Deployment fails with a confusing error about invalid hostnames.
What is the expected correct behavior?
You should see a helpful error telling you that the base domain is required in order for deployments to succeed.
Possible fixes
I believe the problem was introduced in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24580 since we now are always setting the KUBE_INGRESS_BASE_DOMAIN
even if it is blank. Probably we need to update the logic in this bash script to check before overwriting it that AUTO_DEVOPS_DOMAIN
is actually set. Or we can change the other if statement to validate that it's a non empty string. Although I'm not sure what the current bash statement is actually doing.