/[adm]/puppet/modules/git/manifests/svn_repository.pp
ViewVC logotype

Contents of /puppet/modules/git/manifests/svn_repository.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2672 - (show annotations) (download)
Thu Mar 22 10:47:11 2012 UTC (12 years ago) by misc
File size: 921 byte(s)
split svn_repository in a separate file
1 define git::svn_repository( $source,
2 $std_layout = true,
3 $refresh = '*/5') {
4 include git::svn
5 include git::server
6 # a cron job
7 # a exec
8 if $std_layout {
9 $options = '-s'
10 } else {
11 $options = ''
12 }
13
14 exec { "/usr/bin/git svn init $options $source $name":
15 alias => "git svn $name",
16 creates => $name,
17 }
18
19 file { '/usr/local/bin/update_git_svn.sh':
20 mode => '0755',
21 source => 'puppet:///modules/git/update_git_svn.sh',
22 }
23
24 cron { "update $name":
25 # done in 2 times, so fetch can fill the repo after init
26 command => "/usr/local/bin/update_git_svn.sh $name" ,
27 minute => $refresh
28 }
29
30 file { "$name/.git/hooks/pre-receive":
31 mode => '0755',
32 content => template('git/pre-receive'),
33 require => Exec["git svn $name"]
34 }
35 }

  ViewVC Help
Powered by ViewVC 1.1.30