Add extension settings in jjb

Enable passing extra settings to jjb,
so settings needed for extra modules can be
easily set on jenkins_jobs.ini

Extensions must be sent with the format
$extensions = [
  {
    'name'       => 'extension',
    'parameters' => [
      {
        'name'  => 'parameter_name',
        'value' => 'parameter_value',
      }
    ]
  }
]
Enable passing hipchat_authtoken parameter to
enable HipChat integration on jjb.

Change-Id: I7317eda0ad245e3320577d194e545eb4edaf3fac
This commit is contained in:
Yolanda Robla 2015-03-06 14:38:28 +01:00
parent cf9bcbadf1
commit ce1b21cc25
2 changed files with 9 additions and 0 deletions

View File

@ -8,7 +8,9 @@ class jenkins::job_builder (
$git_url = 'https://git.openstack.org/openstack-infra/jenkins-job-builder',
$config_dir = '',
$jenkins_jobs_update_timeout = '600',
$extensions = [],
) {
validate_array($extensions)
# A lot of things need yaml, be conservative requiring this package to avoid
# conflicts with other modules.

View File

@ -2,3 +2,10 @@
user=<%= @username %>
password=<%= @password %>
url=<%= @url %>
<% @extensions.each do |extension| -%>
["<%= extension['name'] %>"]
<% @extension['parameters'].each do |parameter| -%>
<%= parameter['name'] %> = <%= parameter['value'] %>
<% end -%>
<% end -%>