Unify deployment_platform interface with EE

This commit is contained in:
Lin Jen-Shin 2018-03-07 18:14:25 +08:00
parent cfe203fa3a
commit 0917e81783
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,6 @@
module DeploymentPlatform module DeploymentPlatform
def deployment_platform # EE would override this and utilize the extra argument
def deployment_platform(environment: nil)
@deployment_platform ||= @deployment_platform ||=
find_cluster_platform_kubernetes || find_cluster_platform_kubernetes ||
find_kubernetes_service_integration || find_kubernetes_service_integration ||

View file

@ -225,7 +225,7 @@ class Environment < ActiveRecord::Base
end end
def deployment_platform def deployment_platform
project.deployment_platform project.deployment_platform(environment: self)
end end
private private