Commit bc600786 authored by Mayra Cabrera's avatar Mayra Cabrera

Re-arrange deployment_platform to avoid cop complainments

parent 1fc33b5d
module DeploymentPlatform module DeploymentPlatform
# EE would override this and utilize environment argument # EE would override this and utilize environment argument
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def deployment_platform(environment: nil) def deployment_platform(environment: nil)
@deployment_platform ||= {} @deployment_platform ||= {}
@deployment_platform[environment] ||= begin
find_cluster_platform_kubernetes(environment: environment) || @deployment_platform[environment] ||= find_deployment_platform(environment)
end
private
def find_deployment_platform(environment)
find_cluster_platform_kubernetes(environment: environment) ||
find_kubernetes_service_integration || find_kubernetes_service_integration ||
build_cluster_and_deployment_platform build_cluster_and_deployment_platform
end
end end
# EE would override this and utilize environment argument # EE would override this and utilize environment argument
...@@ -15,8 +21,6 @@ module DeploymentPlatform ...@@ -15,8 +21,6 @@ module DeploymentPlatform
.last&.platform_kubernetes .last&.platform_kubernetes
end end
private
def find_kubernetes_service_integration def find_kubernetes_service_integration
services.deployment.reorder(nil).find_by(active: true) services.deployment.reorder(nil).find_by(active: true)
end end
......
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