From 715b90b7bba20049ba6ff61eaed1cb6c1b638eb3 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Fri, 28 Dec 2012 13:55:45 +0000 Subject: subversion: add irker hook --- modules/subversion/manifests/repository.pp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'modules/subversion/manifests') diff --git a/modules/subversion/manifests/repository.pp b/modules/subversion/manifests/repository.pp index 7d9d6265..60846339 100644 --- a/modules/subversion/manifests/repository.pp +++ b/modules/subversion/manifests/repository.pp @@ -2,6 +2,9 @@ # group : group that have commit access on the svn # public : boolean if the svn is readable by anybody or not # commit_mail : array of people who will receive mail after each commit +# irker_conf : hash containing irker config values. See man irkerhook +# for possible values in irker.conf. +# irkerhook_path : path to irkerhook.py script # no_binary : do not accept files with common binary extensions # on this repository # restricted_to_user : restrict commits to select user @@ -13,6 +16,8 @@ define subversion::repository($group = 'svn', $public = true, $commit_mail = '', + $irker_conf = undef, + $irkerhook_path = '/usr/lib/irker/irkerhook.py', $i18n_mail = '', $no_binary = false, $restricted_to_user = false, @@ -81,6 +86,20 @@ define subversion::repository($group = 'svn', } + if $irker_conf { + subversion::hook::post_commit { "$name|irker": + content => template('subversion/hook_irker'), + } + file { "$name/irker.conf": + content => template('subversion/irker.conf'), + } + } else { + file { "$name/hooks/post-commit.d/irker": + ensure => absent, + } + } + + if $no_binary { pre_commit_link { "$name/hooks/pre-commit.d/no_binary": } } else { -- cgit v1.2.1