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.
This commit is contained in:
parent
d5789d4e23
commit
e7e06566e1
|
@ -257,7 +257,7 @@ module Ci
|
|||
variables.concat(project.predefined_variables)
|
||||
variables.concat(pipeline.predefined_variables)
|
||||
variables.concat(runner.predefined_variables) if runner
|
||||
variables.concat(project.deployment_variables) if has_environment?
|
||||
variables.concat(project.deployment_variables(environment: environment)) if has_environment?
|
||||
variables.concat(yaml_variables)
|
||||
variables.concat(user_variables)
|
||||
variables.concat(project.group.secret_variables_for(ref, project)) if project.group
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue