Skip to content

Commit 36caf82

Browse files
authored
Merge pull request #467 from yakatz/document_data_dir
Add documentation for git_data_dir change in Gitlab 18
2 parents 5d7039e + 27eb230 commit 36caf82

File tree

4 files changed

+76
-6
lines changed

4 files changed

+76
-6
lines changed

REFERENCE.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
### Defined types
1818

19-
* [`gitlab::custom_hook`](#gitlab--custom_hook): Manage custom hook files within a GitLab project. Custom hooks can be created as a pre-receive, post-receive, or update hook. Only one of each is currently supported by this module.
20-
* [`gitlab::global_hook`](#gitlab--global_hook): Manage global chain loaded hook files for all GitLab projects. Hooks can be created as a pre-receive, post-receive, or update hook. It's possible to create multipe hooks per type as long as their names are unique. Support for chained (global) hooks is introduced in GitLab Shell 4.1.0 and GitLab 8.15.
19+
* [`gitlab::custom_hook`](#gitlab--custom_hook): Manage custom hook files within a GitLab project.
20+
* [`gitlab::global_hook`](#gitlab--global_hook): Manage global chain loaded hook files for all GitLab projects.
2121
* [`gitlab::system_hook`](#gitlab--system_hook): A file hook will run on each event so it's up to you to filter events or projects
2222

2323
### Tasks
@@ -352,6 +352,37 @@ Data type: `Optional[Hash]`
352352

353353
Hash of git data directories
354354

355+
**Deprecated**: This option was removed in Gitlab 18.
356+
357+
To configure the storage location for a Gitaly node:
358+
```patch
359+
- git_data_dirs => {
360+
- 'default' => { 'path' => '/mnt/example/git-data'},
361+
- },
362+
+ gitaly => {
363+
+ configuration => {
364+
+ 'storage' => [
365+
+ {
366+
+ 'name' => 'default',
367+
+ 'path' => '/mnt/example/git-data/repositories',
368+
+ },
369+
+ ],
370+
+ },
371+
+ },
372+
```
373+
374+
To configure the storage location for other nodes:
375+
```patch
376+
- git_data_dirs => {
377+
- 'default' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075'},
378+
- },
379+
+ gitlab_rails => {
380+
+ repositories_storages => {
381+
+ 'default' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075'},
382+
+ },
383+
+ },
384+
```
385+
355386
Default value: `undef`
356387

357388
##### <a name="-gitlab--gitlab_git_http_server"></a>`gitlab_git_http_server`
@@ -1212,7 +1243,8 @@ Default value: `$gitlab::skip_post_deployment_migrations`
12121243

12131244
### <a name="gitlab--custom_hook"></a>`gitlab::custom_hook`
12141245

1215-
Manage custom hook files within a GitLab project. Custom hooks can be created as a pre-receive, post-receive, or update hook. Only one of each is currently supported by this module.
1246+
Custom hooks can be created as a pre-receive, post-receive, or update hook.
1247+
Only one of each is currently supported by this module.
12161248

12171249
#### Examples
12181250

@@ -1305,7 +1337,9 @@ Default value: `false`
13051337

13061338
### <a name="gitlab--global_hook"></a>`gitlab::global_hook`
13071339

1308-
Manage global chain loaded hook files for all GitLab projects. Hooks can be created as a pre-receive, post-receive, or update hook. It's possible to create multipe hooks per type as long as their names are unique. Support for chained (global) hooks is introduced in GitLab Shell 4.1.0 and GitLab 8.15.
1340+
Hooks can be created as a pre-receive, post-receive, or update hook.
1341+
It's possible to create multipe hooks per type as long as their names are unique.
1342+
Support for chained (global) hooks is introduced in GitLab Shell 4.1.0 and GitLab 8.15.
13091343

13101344
#### Examples
13111345

manifests/custom_hook.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# @summary Manage custom hook files within a GitLab project. Custom hooks can be created as a pre-receive, post-receive, or update hook. Only one of each is currently supported by this module.
1+
# @summary Manage custom hook files within a GitLab project.
2+
# Custom hooks can be created as a pre-receive, post-receive, or update hook.
3+
# Only one of each is currently supported by this module.
24
#
35
# @example Custom hook usage
46
# gitlab::custom_hook { 'my_custom_hook':

manifests/global_hook.pp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# @summary Manage global chain loaded hook files for all GitLab projects. Hooks can be created as a pre-receive, post-receive, or update hook. It's possible to create multipe hooks per type as long as their names are unique. Support for chained (global) hooks is introduced in GitLab Shell 4.1.0 and GitLab 8.15.
1+
# @summary Manage global chain loaded hook files for all GitLab projects.
2+
# Hooks can be created as a pre-receive, post-receive, or update hook.
3+
# It's possible to create multipe hooks per type as long as their names are unique.
4+
# Support for chained (global) hooks is introduced in GitLab Shell 4.1.0 and GitLab 8.15.
25
#
36
# @example Global hook usage
47
# gitlab::custom_hook { 'my_custom_hook':

manifests/init.pp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,37 @@
2727
# @param git Hash of 'omnibus_gitconfig' config parameters.
2828
# @param gitaly Hash of 'omnibus_gitconfig' config parameters.
2929
# @param git_data_dirs Hash of git data directories
30+
#
31+
# **Deprecated**: This option was removed in Gitlab 18.
32+
#
33+
# To configure the storage location for a Gitaly node:
34+
# ```patch
35+
# - git_data_dirs => {
36+
# - 'default' => { 'path' => '/mnt/example/git-data'},
37+
# - },
38+
# + gitaly => {
39+
# + configuration => {
40+
# + 'storage' => [
41+
# + {
42+
# + 'name' => 'default',
43+
# + 'path' => '/mnt/example/git-data/repositories',
44+
# + },
45+
# + ],
46+
# + },
47+
# + },
48+
# ```
49+
#
50+
# To configure the storage location for other nodes:
51+
# ```patch
52+
# - git_data_dirs => {
53+
# - 'default' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075'},
54+
# - },
55+
# + gitlab_rails => {
56+
# + repositories_storages => {
57+
# + 'default' => { 'gitaly_address' => 'tcp://gitaly1.internal:8075'},
58+
# + },
59+
# + },
60+
# ```
3061
# @param gitlab_git_http_server Hash of 'gitlab_git_http_server' config parameters.
3162
# @param gitlab_ci Hash of 'gitlab_ci' config parameters.
3263
# @param gitlab_kas Hash of 'gitlab_kas' config parameters.

0 commit comments

Comments
 (0)