-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwith_custom_hooks.pp
97 lines (81 loc) · 2.29 KB
/
with_custom_hooks.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
class{'git': }
# required to meet dependencies for bundling the gems
package{'libicu-dev':
ensure => 'present',
}
package{'cmake':
ensure => 'present',
}
class{'apache':
default_vhost => false,
server_signature => 'off',
log_formats => { common_forwarded => '%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b'},
}
include apache::mod::passenger
include redis
class{'ruby':
version => '2.0.0',
set_system_default => true,
}
include ruby::dev
include postgresql::server
class {'postgresql::lib::devel':
link_pg_config => false,
}
# Upload some SSL certificates and keys here.
# Setting the gitlab_url used by gitlab shell to use localhost
# because the FQDN of a test VM is unlikly to be real.
class{'gitlab':
gitlab_url => 'https://localhost/',
enable_https => true,
redirect_http => true,
gitlab_app_repo => 'https://github.com/gitlabhq/gitlabhq.git',
gitlab_app_rev => '7-5-stable',
gitlab_shell_repo => 'https://github.com/gitlabhq/gitlab-shell.git',
gitlab_shell_rev => 'v2.2.0',
time_zone => 'Pacific/Auckland',
require => [
Class[
'git',
'postgresql::lib::devel'
],
Package[
'libicu-dev',
'cmake'
]
]
}
# ssh_authorized_key{'[email protected]':
# user => 'git',
# type => 'ssh-rsa',
# options => [
# 'command="/home/git/gitlab-shell/bin/gitlab-shell key-1"',
# 'no-port-forwarding',
# 'no-X11-forwarding',
# 'no-agent-forwarding',
# 'no-pty'
# ],
# key => 'arillylonghash'
# }
gitlab::shell::repo{'a test':
group => 'test',
project => 'testing'
}
# you need to login as an admin and add a user to this project to test these
# scripts work when you push to the repository.
gitlab::shell::repo::hook{'update':
target => 'a test',
content => "#!/bin/bash\necho 'this is a test of the update hook'\npwd\nsource ./custom_hooks/update-part2",
}
gitlab::shell::repo::hook{'update-part2':
target => 'a test',
content => "#!/bin/bash\necho 'this is a test of a chained update hook'",
}
gitlab::shell::repo::hook{'pre-receive':
target => 'a test',
content => "#!/bin/bash\necho 'this is a test of the pre-receive hook'",
}
gitlab::shell::repo::hook{'post-receive':
target => 'a test',
content => "#!/bin/bash\necho 'this is a test of the post-receive hook'",
}