diff options
author | Kushal Pandya <kushalspandya@gmail.com> | 2018-12-20 09:39:09 +0000 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-01-02 17:36:27 +0000 |
commit | d2f5bf39cca7684f4834bfc8d7614901c7cd2542 (patch) | |
tree | 4c55d3bfffe2042df346dc0fa99df208d239c256 /app/models | |
parent | 019f616c7275db84a798dd933ac7d3317ffa0b50 (diff) | |
download | gitlab-ce-d2f5bf39cca7684f4834bfc8d7614901c7cd2542.tar.gz |
Merge branch '55103-hide-group-cluster-features' into 'master'
Resolve "Hide cluster features that don't work yet with Group Clusters"
Closes #55103
See merge request gitlab-org/gitlab-ce!23935
(cherry picked from commit a91138baaba93b72c3b487d38e11299e99d2071e)
4ed4a640 Expose environment's cluster type
55bfea0a Disable terminal button for group clusters
bfbea9b8 Use constants for cluster_type
b1fb15f8 Fix formatting
e9c4f190 Add CHANGELOG.md entry for gitlab-ce!23935
0d608a7b Add test for environment_terminal_button
e18fb5b3 Memoize call for EnvironmentEntity#cluster_type
a45fb5d6 Moves memoization to Environment
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/environment.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index 934828946b9..cdfe3b7c023 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class Environment < ActiveRecord::Base + include Gitlab::Utils::StrongMemoize # Used to generate random suffixes for the slug LETTERS = 'a'..'z' NUMBERS = '0'..'9' @@ -231,7 +232,9 @@ class Environment < ActiveRecord::Base end def deployment_platform - project.deployment_platform(environment: self.name) + strong_memoize(:deployment_platform) do + project.deployment_platform(environment: self.name) + end end private |