summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-14 10:05:06 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-03-14 10:05:06 +0100
commite7e06566e150af8ecc54c67bd6f5cd5b86c99628 (patch)
tree11ab4aa1d7aafa4c1023fdbb0e13e89fd1125fb9 /app/models/project.rb
parentd5789d4e2396716783520a695f756a58c3788175 (diff)
downloadgitlab-ce-e7e06566e150af8ecc54c67bd6f5cd5b86c99628.tar.gz
Port deployment variables skeleton code from EE
This commit backports method signatures and related implementation to the CE, to make CE and EE identical. This does not add any features from EE, it is only aimed to reduce conflicts between CE and EE in the future.
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index e307d384e74..87d228997be 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1616,10 +1616,8 @@ class Project < ActiveRecord::Base
end
end
- def deployment_variables
- return [] unless deployment_platform
-
- deployment_platform.predefined_variables
+ def deployment_variables(environment: nil)
+ deployment_platform(environment: environment)&.predefined_variables || []
end
def auto_devops_variables