Commit 45d99c92 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Unify deployment_platform interface with CE

Make sure we override the method from CE, too
parent fe1a3903
module DeploymentPlatform
# EE would override this and utilize the extra argument
def deployment_platform(environment: nil)
@deployment_platform ||=
find_cluster_platform_kubernetes ||
......
......@@ -137,10 +137,6 @@ class Environment < ActiveRecord::Base
end
end
def deployment_platform
project.deployment_platform(environment: self)
end
def has_terminals?
deployment_platform.present? && available? && last_deployment.present?
end
......@@ -234,6 +230,10 @@ class Environment < ActiveRecord::Base
self.environment_type || self.name
end
def deployment_platform
project.deployment_platform(environment: self)
end
private
# Slugifying a name may remove the uniqueness guarantee afforded by it being
......
module EE
module DeploymentPlatform
extend ::Gitlab::Utils::Override
override :deployment_platform
def deployment_platform(environment: nil)
return super unless environment && feature_available?(:multiple_clusters)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment