Merge "Allow puppet to configure Gerrit's receive.maxObjectSizeLimit option"

This commit is contained in:
Jenkins
2016-01-04 23:14:49 +00:00
committed by Gerrit Code Review
2 changed files with 8 additions and 0 deletions

View File

@@ -107,6 +107,8 @@
# Number of threads to use for indexing in normal interactive operations
# allow_drafts:
# Set this to false to disable drafts feature
# receive_max_object_size_limit
# Maximum allowed Git object size that 'receive-pack' will accept.
# TODO: make more gerrit options configurable here
#
class gerrit(
@@ -193,6 +195,7 @@ class gerrit(
$index_threads = 1,
$new_groups_visible_to_all = true,
$allow_drafts = true,
$receive_max_object_size_limit = '',
) {
include ::httpd
@@ -367,6 +370,7 @@ class gerrit(
# - $index_threads:
# - $new_groups_visible_to_all:
# - $allow_drafts:
# - $receive_max_object_size_limit
file { '/home/gerrit2/review_site/etc/gerrit.config':
ensure => present,
owner => 'gerrit2',

View File

@@ -99,6 +99,10 @@
email = <%= @email %>
[change]
allowDrafts = <%= @allow_drafts %>
[receive]
<% if @receive_max_object_size_limit != "" -%>
maxObjectSizeLimit = <%= @receive_max_object_size_limit %>
<% end -%>
<% @commentlinks.each do |commentlink| -%>
[commentlink "<%= commentlink['name'] %>"]
match = "<%= commentlink['match'] %>"