diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /doc/administration/file_hooks.md | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) | |
download | gitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'doc/administration/file_hooks.md')
-rw-r--r-- | doc/administration/file_hooks.md | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/doc/administration/file_hooks.md b/doc/administration/file_hooks.md index 21ade36a2a5..7903da675fd 100644 --- a/doc/administration/file_hooks.md +++ b/doc/administration/file_hooks.md @@ -14,12 +14,12 @@ ensure functionality is preserved across versions and covered by tests. NOTE: **Note:** File hooks must be configured on the filesystem of the GitLab server. Only GitLab server administrators will be able to complete these tasks. Explore -[system hooks] or [webhooks] as an option if you do not have filesystem access. +[system hooks](../system_hooks/system_hooks.md) or [webhooks](../user/project/integrations/webhooks.md) as an option if you do not have filesystem access. A file hook will run on each event so it's up to you to filter events or projects within a file hook code. You can have as many file hooks as you want. Each file hook will be triggered by GitLab asynchronously in case of an event. For a list of events -see the [system hooks] documentation. +see the [system hooks](../system_hooks/system_hooks.md) documentation. ## Setup @@ -35,8 +35,8 @@ Follow the steps below to set up a custom hook: `/home/git/gitlab/file_hooks/`. For Omnibus installs the path is usually `/opt/gitlab/embedded/service/gitlab-rails/file_hooks`. - For [highly available] configurations, your hook file should exist on each - application server. + For [configurations with multiple servers](reference_architectures/index.md), + your hook file should exist on each application server. 1. Inside the `file_hooks` directory, create a file with a name of your choice, without spaces or special characters. @@ -46,7 +46,7 @@ Follow the steps below to set up a custom hook: language type. For example, if the script is in Ruby the shebang will probably be `#!/usr/bin/env ruby`. 1. The data to the file hook will be provided as JSON on STDIN. It will be exactly - same as for [system hooks] + same as for [system hooks](../system_hooks/system_hooks.md). That's it! Assuming the file hook code is properly implemented, the hook will fire as appropriate. The file hooks file list is updated for each event, there is no @@ -110,7 +110,3 @@ Validating file hooks from /file_hooks directory * /home/git/gitlab/file_hooks/save_to_file.clj succeed (zero exit code) * /home/git/gitlab/file_hooks/save_to_file.rb failure (non-zero exit code) ``` - -[system hooks]: ../system_hooks/system_hooks.md -[webhooks]: ../user/project/integrations/webhooks.md -[highly available]: ./availability/index.md |