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

Diff of /puppet/modules/git/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2671 by misc, Thu Mar 22 10:47:04 2012 UTC revision 2672 by misc, Thu Mar 22 10:47:11 2012 UTC
# Line 1  Line 1 
1  class git {  class git { }
     define svn_repository($source,  
                           $std_layout = true,  
                           $refresh = '*/5') {  
         include git::svn  
         include git::server  
         # a cron job  
         # a exec  
         if $std_layout {  
             $options = '-s'  
         } else {  
             $options =  ''  
         }  
   
         exec { "/usr/bin/git svn init $options $source $name":  
             alias   => "git svn $name",  
             creates => $name,  
         }  
   
         file { '/usr/local/bin/update_git_svn.sh':  
             mode   => '0755',  
             source => 'puppet:///modules/git/update_git_svn.sh',  
         }  
   
         cron { "update $name":  
             # done in 2 times, so fetch can fill the repo after init  
             command => "/usr/local/bin/update_git_svn.sh $name" ,  
             minute  => $refresh  
         }  
   
         file { "$name/.git/hooks/pre-receive":  
             mode    => '0755',  
             content => template('git/pre-receive'),  
             require => Exec["git svn $name"]  
         }  
     }  
   
 }  

Legend:
Removed from v.2671  
changed lines
  Added in v.2672

  ViewVC Help
Powered by ViewVC 1.1.28