5 |
} |
} |
6 |
|
|
7 |
class server inherits common { |
class server inherits common { |
8 |
|
# http://www.kernel.org/pub/software/scm/git/docs/everyday.html#Repository%20Administration |
9 |
$git_base_path = '/git/' |
$git_base_path = '/git/' |
10 |
|
|
11 |
xinetd::service { "git": |
xinetd::service { "git": |
18 |
|
|
19 |
# TODO |
# TODO |
20 |
# define common syntax check, see svn |
# define common syntax check, see svn |
21 |
# proper policy : no-fast-forward |
# http://stackoverflow.com/questions/3719883/git-hook-syntax-check |
22 |
|
# proper policy : fast-forward-only |
23 |
|
# ( http://progit.org/book/ch7-4.html ) |
24 |
# no branch ? |
# no branch ? |
25 |
# no binary |
# no binary |
26 |
# no big file |
# no big file |
27 |
# no empty commit message, no root |
# no empty commit message |
28 |
|
# no commit from root |
29 |
|
# see http://www.itk.org/Wiki/Git/Hooks |
30 |
# 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 |
# 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 |
31 |
# |
# |
32 |
# how do we handle commit permission ? |
# how do we handle commit permission ? |
33 |
|
# mail sending |
34 |
|
# |
35 |
} |
} |
36 |
|
|
37 |
define repository($description = '') { |
define repository($description = '') { |
38 |
|
# http://eagleas.livejournal.com/18907.html |
39 |
|
# TODO --shared=group + set g+ws |
40 |
exec { "git init --bare $name": |
exec { "git init --bare $name": |
41 |
creates => $name, |
creates => $name, |
42 |
} |
} |