Parent Directory
|
Revision Log
Support git snapshots of a specific branch name (needed for identity.mageia.org)
1 | define git::snapshot( $source, |
2 | $refresh = '*/5', |
3 | $user = 'root', |
4 | $branch = 'master') { |
5 | include git::client |
6 | #TODO |
7 | # should handle branch -> clone -n + branch + checkout |
8 | # create a script |
9 | # Idealy, should be handled by vcsrepo |
10 | # https://github.com/bruce/puppet-vcsrepo |
11 | # once it is merged in puppet |
12 | exec { "/usr/bin/git clone -b $branch $source $name": |
13 | creates => $name, |
14 | user => $user |
15 | } |
16 | |
17 | if ($refresh != '0') { |
18 | cron { "update $name": |
19 | # FIXME no -q ? |
20 | command => "cd $name && /usr/bin/git pull", |
21 | user => $user, |
22 | minute => $refresh |
23 | } |
24 | } |
25 | } |
ViewVC Help | |
Powered by ViewVC 1.1.28 |