diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-03-21 08:59:40 -0600 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-03-22 14:52:33 -0600 |
commit | ca59bfdc6657fc20a27e93f41fc9e38c41498389 (patch) | |
tree | fb1a7397b1940445dc7c41ba8133027df2812258 /app/models/clusters | |
parent | fbb83069deaad3db1239af66e6c9dc913f29f8f8 (diff) | |
download | gitlab-ce-ca59bfdc6657fc20a27e93f41fc9e38c41498389.tar.gz |
Rearrange DeploymentPlatform methods
- Change find_cluster_platform_kubernetes to ignore environment argument
- Fix broken specs
CE Port of: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5047/
Diffstat (limited to 'app/models/clusters')
-rw-r--r-- | app/models/clusters/cluster.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/clusters/cluster.rb b/app/models/clusters/cluster.rb index 49eb069016a..bfdfc5ae6fe 100644 --- a/app/models/clusters/cluster.rb +++ b/app/models/clusters/cluster.rb @@ -10,6 +10,7 @@ module Clusters Applications::Prometheus.application_name => Applications::Prometheus, Applications::Runner.application_name => Applications::Runner }.freeze + DEFAULT_ENVIRONMENT = '*'.freeze belongs_to :user @@ -50,6 +51,7 @@ module Clusters scope :enabled, -> { where(enabled: true) } scope :disabled, -> { where(enabled: false) } + scope :default_environment, -> { where(environment_scope: DEFAULT_ENVIRONMENT) } def status_name if provider |