Merge "Allow puppet to configure Gerrit's download protocols"

This commit is contained in:
Jenkins 2016-04-12 18:39:09 +00:00 committed by Gerrit Code Review
commit 9bb4ed673e
2 changed files with 19 additions and 0 deletions

View File

@ -118,6 +118,15 @@
# Set this to false to disable drafts feature
# receive_max_object_size_limit
# Maximum allowed Git object size that 'receive-pack' will accept.
# download:
# The allowed download commands and schemes. The data structor for this
# should be a hash with keys and array of values (i.e. {key => [values]})
# Example:
# download => {
# 'command' => ['checkout', 'cherry_pick', 'pull', 'format_patch'],
# 'scheme' => ['ssh', 'anon_http', 'anon_git'],
# 'archive' => ['tar', 'tbz2', 'tgz', 'txz'],
# },
# TODO: make more gerrit options configurable here
#
class gerrit(
@ -212,6 +221,7 @@ class gerrit(
$receive_max_object_size_limit = '',
$cache_diff_timeout = '',
$cache_diff_intraline_timeout = '',
$download = {},
) {
include ::httpd
@ -394,6 +404,7 @@ class gerrit(
# - $receive_max_object_size_limit
# - $cache_diff_timeout
# - $cache_diff_intraline_timeout
# - $download
file { '/home/gerrit2/review_site/etc/gerrit.config':
ensure => present,

View File

@ -180,6 +180,14 @@
threads = <%= @index_threads %>
<% end -%>
<% end -%>
<% unless @download.empty? -%>
[download]
<% @download.each do |key, item| -%>
<% item.each do |value| -%>
<%= key %> = <%= value %>
<% end -%>
<% end -%>
<% end -%>
[groups]
newGroupsVisibleToAll = <%= @new_groups_visible_to_all %>
[mimetype "image/*"]