aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2011-02-02 19:38:47 +0000
committerMichael Scherer <misc@mageia.org>2011-02-02 19:38:47 +0000
commit211c52e9623afafbe787c9327a026d767e22a6b5 (patch)
tree240f9aa0558a57b49c4e28396e8175e0a14cf67f /modules/git
parent1cd967ce52c5c175d5b7246f728fea50be006e6c (diff)
downloadpuppet-211c52e9623afafbe787c9327a026d767e22a6b5.tar
puppet-211c52e9623afafbe787c9327a026d767e22a6b5.tar.gz
puppet-211c52e9623afafbe787c9327a026d767e22a6b5.tar.bz2
puppet-211c52e9623afafbe787c9327a026d767e22a6b5.tar.xz
puppet-211c52e9623afafbe787c9327a026d767e22a6b5.zip
draft of a git svn define
Diffstat (limited to 'modules/git')
-rw-r--r--modules/git/manifests/init.pp31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/git/manifests/init.pp b/modules/git/manifests/init.pp
index 1853ab94..dee9fb86 100644
--- a/modules/git/manifests/init.pp
+++ b/modules/git/manifests/init.pp
@@ -67,6 +67,37 @@ class git {
}
}
+ define svn_repository($source,
+ $std_layout = true,
+ $refresh = '*/5') {
+ include git::client
+ include git::server
+ # a cron job
+ # a exec
+ if $std_layout {
+ $options = "-s"
+ } else {
+ $options = " "
+ }
+
+ exec { "/usr/bin/git svn clone $options $source $name":
+ creates => $name,
+ }
+
+ cron { "update $name":
+ command => "cd $name && /usr/bin/git svn rebase" ,
+ minute => $refresh
+ }
+ # TODO find a way to prevent commit
+ file { "$name/.git/hooks/pre-receive":
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 755,
+ content => "#!bin/bash\nfalse"
+ }
+ }
+
class client inherits common {