Commit 40c2617d authored by Shinya Maeda's avatar Shinya Maeda

Add where(environment_scope: *) to deployment_platform

parent 75d58a39
...@@ -906,7 +906,7 @@ class Project < ActiveRecord::Base ...@@ -906,7 +906,7 @@ class Project < ActiveRecord::Base
end end
def deployment_platform def deployment_platform
@deployment_platform ||= clusters.find_by(enabled: true)&.platform_kubernetes @deployment_platform ||= clusters.where(environment_scope: '*').find_by(enabled: true)&.platform_kubernetes
@deployment_platform ||= services.where(category: :deployment).reorder(nil).find_by(active: true) @deployment_platform ||= services.where(category: :deployment).reorder(nil).find_by(active: true)
end end
......
...@@ -261,7 +261,7 @@ module EE ...@@ -261,7 +261,7 @@ module EE
cluster.matches?(environment) # TODO: This is the same logic with Environment Variable cluster.matches?(environment) # TODO: This is the same logic with Environment Variable
end.first&.platform_kubernetes end.first&.platform_kubernetes
@deployment_platform ||= services.where(category: :deployment).reorder(nil).find_by(active: true) super # Wildcard or KubernetesService
end end
def secret_variables_for(ref:, environment: nil) def secret_variables_for(ref:, environment: nil)
......
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