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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 795 - (show annotations) (download)
Fri Jan 14 02:40:26 2011 UTC (13 years, 3 months ago) by misc
File size: 1438 byte(s)
- add a git module prototype
1 class git {
2 class common {
3 package { 'git-core':
4 }
5 }
6
7 class server inherits common {
8 # TODO
9 # integration with xinetd for anonymous co
10 # creation of /git
11 # define common syntax check, see svn
12 # proper policy : no-fast-forward
13 # no branch ?
14 # no binary
15 # no big file
16 # no empty commit message, no root
17 # automated push to another git repo ( see http://noone.org/blog/English/Computer/VCS/Thoughts%20on%20Gitorious%20and%20GitHub%20plus%20a%20useful%20git%20hook.futile
18 #
19 # how do we handle commit permission ?
20 }
21
22 define repository {
23 # TODO
24
25 }
26
27 class client inherits common {
28
29
30 }
31
32 define snapshot($source, $refresh ='*/5', $user = 'root') {
33 include git::client
34 #TODO
35 # should handle branch -> clone -n + branch + checkout
36 # create a script
37 # Idealy, should be handled by vcsrepo https://github.com/bruce/puppet-vcsrepo
38 # once it is merged in puppet
39 exec { "/usr/bin/git clone $source $name":
40 creates => $name,
41 user => $user
42 }
43
44 cron { "update $name":
45 # FIXME no -q ?
46 command => "cd $name && /usr/bin/git pull",
47 user => $user,
48 minute => $refresh
49 }
50 }
51 }
52
53
54

  ViewVC Help
Powered by ViewVC 1.1.30