diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2016-12-16 13:24:03 +0100 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2016-12-16 13:24:03 +0100 |
commit | c945a0a7141ddf80e58e821178195cc48b8143f0 (patch) | |
tree | 9dcc3cdf890800b6c4a3ad006c04b0c1c2e6530a /app/models/project.rb | |
parent | 45bd2263698892b9de6eb7956e3085a61054f49f (diff) | |
download | gitlab-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.rb | 6 |
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) |