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 | |
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')
-rw-r--r-- | app/models/clusters/cluster.rb | 20 | ||||
-rw-r--r-- | app/models/project_auto_devops.rb | 11 |
2 files changed, 1 insertions, 30 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") diff --git a/app/models/project_auto_devops.rb b/app/models/project_auto_devops.rb index f972c40f317..e71de1cdc65 100644 --- a/app/models/project_auto_devops.rb +++ b/app/models/project_auto_devops.rb @@ -24,19 +24,8 @@ class ProjectAutoDevops < ApplicationRecord domain.present? || instance_domain.present? end - # From 11.8, AUTO_DEVOPS_DOMAIN has been replaced by KUBE_INGRESS_BASE_DOMAIN. - # See Clusters::Cluster#predefined_variables and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24580 - # for more info. - # - # Suppport AUTO_DEVOPS_DOMAIN is scheduled to be removed on - # https://gitlab.com/gitlab-org/gitlab-ce/issues/52363 def predefined_variables Gitlab::Ci::Variables::Collection.new.tap do |variables| - if has_domain? - variables.append(key: 'AUTO_DEVOPS_DOMAIN', - value: domain.presence || instance_domain) - end - variables.concat(deployment_strategy_default_variables) end end |