84 |
alias => "git svn $name", |
alias => "git svn $name", |
85 |
creates => $name, |
creates => $name, |
86 |
} |
} |
87 |
# TODO what if there is 2 concurents jobs ? |
|
88 |
# should we add a lock ( ie, a script + lock file for first sync ) |
file { "/usr/local/bin/update_git_svn.sh": |
89 |
|
ensure => present, |
90 |
|
owner => root, |
91 |
|
group => root, |
92 |
|
mode => 755, |
93 |
|
source => 'puppet:///modules/git/update_git_svn.sh', |
94 |
|
} |
95 |
|
|
96 |
cron { "update $name": |
cron { "update $name": |
97 |
# done in 2 times, so fetch can fill the repo after init |
# done in 2 times, so fetch can fill the repo after init |
98 |
command => "cd $name && /usr/bin/git svn fetch && /usr/bin/git svn rebase" , |
command => "/usr/local/bin/update_git_svn.sh $name" , |
99 |
minute => $refresh |
minute => $refresh |
100 |
} |
} |
101 |
# TODO find a way to prevent commit |
|
102 |
file { "$name/.git/hooks/pre-receive": |
file { "$name/.git/hooks/pre-receive": |
103 |
ensure => present, |
ensure => present, |
104 |
owner => root, |
owner => root, |