diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-05-20 15:55:11 +1200 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-05-24 14:40:12 +1200 |
commit | f0efa2f91f8687a1cf0f39596790edaf338e8ec5 (patch) | |
tree | 8db640fa0967104f45cfd3fe96b6ca7a884889c6 /app/models/clusters | |
parent | 7b5cc7b47e1aa0221b9aac85049388192ade4ed4 (diff) | |
download | gitlab-ce-f0efa2f91f8687a1cf0f39596790edaf338e8ec5.tar.gz |
Stop emitting AUTO_DEVOPS_DOMAIN Ci variable
Update documentation to reflect removal
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/cluster.rb | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb index f7ea7accab2..3c6e185f9e2 100644 --- a/app/models/clusters/cluster.rb +++ b/app/models/clusters/cluster.rb @@ -204,7 +204,7 @@ module Clusters end def kube_ingress_domain - @kube_ingress_domain ||= domain.presence || instance_domain || legacy_auto_devops_domain + @kube_ingress_domain ||= domain.presence || instance_domain end def predefined_variables @@ -221,24 +221,6 @@ module Clusters @instance_domain ||= Gitlab::CurrentSettings.auto_devops_domain end - # To keep backward compatibility with AUTO_DEVOPS_DOMAIN - # environment variable, we need to ensure KUBE_INGRESS_BASE_DOMAIN - # is set if AUTO_DEVOPS_DOMAIN is set on any of the following options: - # ProjectAutoDevops#Domain, project variables or group variables, - # as the AUTO_DEVOPS_DOMAIN is needed for CI_ENVIRONMENT_URL - # - # This method should is scheduled to be removed on - # https://gitlab.com/gitlab-org/gitlab-ce/issues/56959 - def legacy_auto_devops_domain - if project_type? - project&.auto_devops&.domain.presence || - project.variables.find_by(key: 'AUTO_DEVOPS_DOMAIN')&.value.presence || - project.group&.variables&.find_by(key: 'AUTO_DEVOPS_DOMAIN')&.value.presence - elsif group_type? - group.variables.find_by(key: 'AUTO_DEVOPS_DOMAIN')&.value.presence - end - end - def restrict_modification if provider&.on_creation? errors.add(:base, "cannot modify during creation") |