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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2672 - (hide annotations) (download)
Thu Mar 22 10:47:11 2012 UTC (10 years, 5 months ago) by misc
File size: 921 byte(s)
split svn_repository in a separate file
1 misc 2672 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.28