Merge "Allow puppet to configure Gerrit's download protocols"
This commit is contained in:
@@ -118,6 +118,15 @@
|
|||||||
# Set this to false to disable drafts feature
|
# Set this to false to disable drafts feature
|
||||||
# receive_max_object_size_limit
|
# receive_max_object_size_limit
|
||||||
# Maximum allowed Git object size that 'receive-pack' will accept.
|
# 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
|
# TODO: make more gerrit options configurable here
|
||||||
#
|
#
|
||||||
class gerrit(
|
class gerrit(
|
||||||
@@ -212,6 +221,7 @@ class gerrit(
|
|||||||
$receive_max_object_size_limit = '',
|
$receive_max_object_size_limit = '',
|
||||||
$cache_diff_timeout = '',
|
$cache_diff_timeout = '',
|
||||||
$cache_diff_intraline_timeout = '',
|
$cache_diff_intraline_timeout = '',
|
||||||
|
$download = {},
|
||||||
) {
|
) {
|
||||||
include ::httpd
|
include ::httpd
|
||||||
|
|
||||||
@@ -394,6 +404,7 @@ class gerrit(
|
|||||||
# - $receive_max_object_size_limit
|
# - $receive_max_object_size_limit
|
||||||
# - $cache_diff_timeout
|
# - $cache_diff_timeout
|
||||||
# - $cache_diff_intraline_timeout
|
# - $cache_diff_intraline_timeout
|
||||||
|
# - $download
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
|||||||
@@ -180,6 +180,14 @@
|
|||||||
threads = <%= @index_threads %>
|
threads = <%= @index_threads %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% unless @download.empty? -%>
|
||||||
|
[download]
|
||||||
|
<% @download.each do |key, item| -%>
|
||||||
|
<% item.each do |value| -%>
|
||||||
|
<%= key %> = <%= value %>
|
||||||
|
<% end -%>
|
||||||
|
<% end -%>
|
||||||
|
<% end -%>
|
||||||
[groups]
|
[groups]
|
||||||
newGroupsVisibleToAll = <%= @new_groups_visible_to_all %>
|
newGroupsVisibleToAll = <%= @new_groups_visible_to_all %>
|
||||||
[mimetype "image/*"]
|
[mimetype "image/*"]
|
||||||
|
|||||||
Reference in New Issue
Block a user