Allow puppet to configure the Gerrit drafts feature
In Gerrit 2.11 disabling draft pushes in gerrit ACLS was not enough to disable the drafts feature. There is now a change.allowDrafts [1] settting in gerrit.config to disable drafts which also needs to be set. This change allows puppet configure this setting. [1] https://review-dev.openstack.org/Documentation/config-gerrit.html#change Change-Id: Iea970a85d433d8707102a3dcaf8cbae2d5662b6e
This commit is contained in:
@@ -99,6 +99,8 @@
|
|||||||
# The number of threads to use for full offline reindexing of Gerrit data
|
# The number of threads to use for full offline reindexing of Gerrit data
|
||||||
# index_threads:
|
# index_threads:
|
||||||
# Number of threads to use for indexing in normal interactive operations
|
# Number of threads to use for indexing in normal interactive operations
|
||||||
|
# allow_drafts:
|
||||||
|
# Set this to false to disable drafts feature
|
||||||
# TODO: make more gerrit options configurable here
|
# TODO: make more gerrit options configurable here
|
||||||
#
|
#
|
||||||
class gerrit(
|
class gerrit(
|
||||||
@@ -181,6 +183,7 @@ class gerrit(
|
|||||||
$report_bug_url = '',
|
$report_bug_url = '',
|
||||||
$index_threads = 1,
|
$index_threads = 1,
|
||||||
$new_groups_visible_to_all = true,
|
$new_groups_visible_to_all = true,
|
||||||
|
$allow_drafts = true,
|
||||||
) {
|
) {
|
||||||
include ::httpd
|
include ::httpd
|
||||||
|
|
||||||
@@ -349,6 +352,7 @@ class gerrit(
|
|||||||
# - $reindex_threads:
|
# - $reindex_threads:
|
||||||
# - $index_threads:
|
# - $index_threads:
|
||||||
# - $new_groups_visible_to_all:
|
# - $new_groups_visible_to_all:
|
||||||
|
# - $allow_drafts:
|
||||||
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
owner => 'gerrit2',
|
owner => 'gerrit2',
|
||||||
|
|||||||
@@ -89,6 +89,8 @@
|
|||||||
maxAge = 1d
|
maxAge = 1d
|
||||||
[user]
|
[user]
|
||||||
email = <%= @email %>
|
email = <%= @email %>
|
||||||
|
[change]
|
||||||
|
allowDrafts = <%= @allow_drafts %>
|
||||||
<% @commentlinks.each do |commentlink| -%>
|
<% @commentlinks.each do |commentlink| -%>
|
||||||
[commentlink "<%= commentlink['name'] %>"]
|
[commentlink "<%= commentlink['name'] %>"]
|
||||||
match = "<%= commentlink['match'] %>"
|
match = "<%= commentlink['match'] %>"
|
||||||
|
|||||||
Reference in New Issue
Block a user