summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2016-12-16 13:24:03 +0100
committerAdam Niedzielski <adamsunday@gmail.com>2016-12-16 13:24:03 +0100
commitc945a0a7141ddf80e58e821178195cc48b8143f0 (patch)
tree9dcc3cdf890800b6c4a3ad006c04b0c1c2e6530a /app/models/project.rb
parent45bd2263698892b9de6eb7956e3085a61054f49f (diff)
downloadgitlab-ce-c945a0a7141ddf80e58e821178195cc48b8143f0.tar.gz
Pass variables from deployment project services to CI runnerexpose-deployment-variables
This commit introduces the concept of deployment variables - variables that are collected from deployment services and passed to CI runner during a deployment build. Deployment services specify the variables by overriding "predefined_variables" method. This commit also configures variables for KubernetesService
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 2c726cfc5df..5f8058dac60 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -1229,6 +1229,12 @@ class Project < ActiveRecord::Base
end
end
+ def deployment_variables
+ return [] unless deployment_service
+
+ deployment_service.predefined_variables
+ end
+
def append_or_update_attribute(name, value)
old_values = public_send(name.to_s)