Merge "Allow puppet to configure gerrit commitmessage parameters"
This commit is contained in:
commit
4d559ab5ca
|
@ -129,6 +129,14 @@
|
||||||
# 'scheme' => ['ssh', 'anon_http', 'anon_git'],
|
# 'scheme' => ['ssh', 'anon_http', 'anon_git'],
|
||||||
# 'archive' => ['tar', 'tbz2', 'tgz', 'txz'],
|
# 'archive' => ['tar', 'tbz2', 'tgz', 'txz'],
|
||||||
# },
|
# },
|
||||||
|
# commitmessage_params:
|
||||||
|
# A dict of commit message parameters, valid params are: maxLineLength,
|
||||||
|
# longLinesThreshold, rejectTooLong, and maxSubjectLength.
|
||||||
|
# Example:
|
||||||
|
# commitmessage_params => {
|
||||||
|
# maxSubjectLength => '60',
|
||||||
|
# maxLineLength => '72',
|
||||||
|
# },
|
||||||
# java_home:
|
# java_home:
|
||||||
# The path to java home directory
|
# The path to java home directory
|
||||||
# TODO: make more gerrit options configurable here
|
# TODO: make more gerrit options configurable here
|
||||||
|
@ -227,6 +235,7 @@ class gerrit(
|
||||||
$cache_diff_timeout = '',
|
$cache_diff_timeout = '',
|
||||||
$cache_diff_intraline_timeout = '',
|
$cache_diff_intraline_timeout = '',
|
||||||
$download = {},
|
$download = {},
|
||||||
|
$commitmessage_params = {},
|
||||||
$java_home = '/usr/lib/jvm/java-7-openjdk-amd64/jre',
|
$java_home = '/usr/lib/jvm/java-7-openjdk-amd64/jre',
|
||||||
) {
|
) {
|
||||||
include ::httpd
|
include ::httpd
|
||||||
|
@ -407,6 +416,7 @@ class gerrit(
|
||||||
# - $cache_diff_timeout
|
# - $cache_diff_timeout
|
||||||
# - $cache_diff_intraline_timeout
|
# - $cache_diff_intraline_timeout
|
||||||
# - $download
|
# - $download
|
||||||
|
# - $commitmessage_params
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
|
|
@ -33,6 +33,13 @@ class { '::gerrit':
|
||||||
ssh_replication_rsa_pubkey_contents => file('/tmp/gerrit-ssh-keys/ssh_replication_rsa_key.pub'),
|
ssh_replication_rsa_pubkey_contents => file('/tmp/gerrit-ssh-keys/ssh_replication_rsa_key.pub'),
|
||||||
secondary_index => true,
|
secondary_index => true,
|
||||||
secondary_index_type => 'LUCENE',
|
secondary_index_type => 'LUCENE',
|
||||||
|
commitmessage_params =>
|
||||||
|
{
|
||||||
|
maxSubjectLength => '60',
|
||||||
|
maxLineLength => '72',
|
||||||
|
longLinesThreshold => '20',
|
||||||
|
rejectTooLong => 'true',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::gerrit::cron': }
|
class { '::gerrit::cron': }
|
||||||
|
|
|
@ -193,6 +193,14 @@
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% unless @commitmessage_params.nil? or @commitmessage_params.empty? -%>
|
||||||
|
[commitmessage]
|
||||||
|
<% @commitmessage_params.each do |key, value| -%>
|
||||||
|
<% if key == "maxLineLength" or key == "longLinesThreshold" or key == "rejectTooLong" or key == "maxSubjectLength" -%>
|
||||||
|
<%= key %> = <%= value %>
|
||||||
|
<% end -%>
|
||||||
|
<% end -%>
|
||||||
|
<% end -%>
|
||||||
[groups]
|
[groups]
|
||||||
newGroupsVisibleToAll = <%= @new_groups_visible_to_all %>
|
newGroupsVisibleToAll = <%= @new_groups_visible_to_all %>
|
||||||
[mimetype "image/*"]
|
[mimetype "image/*"]
|
||||||
|
|
Loading…
Reference in New Issue