Commit 25adee56 authored by Thong Kuah's avatar Thong Kuah

Move innards of cluster method to environment

Environment already has a memoized deployment plaform.

No need to check for respond_to?(:cluster) now that all deployment
platforms are Clusters::Cluster.
parent f89a33c9
...@@ -85,11 +85,7 @@ class Deployment < ApplicationRecord ...@@ -85,11 +85,7 @@ class Deployment < ApplicationRecord
end end
def cluster def cluster
platform = project.deployment_platform(environment: environment.name) environment.deployment_platform&.cluster
if platform.present? && platform.respond_to?(:cluster)
platform.cluster
end
end end
def execute_hooks def execute_hooks
......
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