Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/administration/server_hooks.md')
-rw-r--r--doc/administration/server_hooks.md20
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/administration/server_hooks.md b/doc/administration/server_hooks.md
index 4d8377b4117..562c8547d90 100644
--- a/doc/administration/server_hooks.md
+++ b/doc/administration/server_hooks.md
@@ -1,7 +1,7 @@
---
stage: Systems
group: Gitaly
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Git server hooks **(FREE SELF)**
@@ -18,8 +18,13 @@ on the GitLab server. You can use them to run Git-related tasks such as:
Git server hooks use `pre-receive`, `post-receive`, and `update`
[Git server-side hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#_server_side_hooks).
-GitLab administrators configure server hooks on the file system of the GitLab server. If you don't have file system access,
-alternatives to server hooks include:
+GitLab administrators configure server hooks using the `gitaly` command, which also:
+
+- Is used to launch a Gitaly server.
+- Provides several subcommands.
+- Connects to the Gitaly gRPC API.
+
+If you don't have access to the `gitaly` command, alternatives to server hooks include:
- [Webhooks](../user/project/integrations/webhooks.md).
- [GitLab CI/CD](../ci/index.md).
@@ -49,7 +54,7 @@ To set server hooks for a repository:
example, if the script is in Ruby the shebang is probably `#!/usr/bin/env ruby`.
- To create a single server hook, create a file with a name that matches the hook type. For example, for a
- `pre-receive` server hook, the filename should be `pre-receive` with no extension.
+ `pre-receive` server hook, the file name should be `pre-receive` with no extension.
- To create many server hooks, create a directory for the hooks that matches the hook type. For example, for a
`pre-receive` server hook, the directory name should be `pre-receive.d`. Put the files for the hook in that
directory.
@@ -71,8 +76,7 @@ If you implemented the server hook code correctly, it should execute when the Gi
To create server hooks for a repository:
-1. On the left sidebar, select **Search or go to**.
-1. Select **Admin Area**.
+1. On the left sidebar, at the bottom, select **Admin Area**.
1. Go to **Overview > Projects** and select the project you want to add a server hook to.
1. On the page that appears, locate the value of **Relative path**. This path is where server
hooks must be located.
@@ -85,7 +89,7 @@ To create server hooks for a repository:
1. On the file system, create a new directory in the correct location called `custom_hooks`.
1. In the new `custom_hooks` directory:
- To create a single server hook, create a file with a name that matches the hook type. For example, for a
- `pre-receive` server hook, the filename should be `pre-receive` with no extension.
+ `pre-receive` server hook, the file name should be `pre-receive` with no extension.
- To create many server hooks, create a directory for the hooks that matches the hook type. For example, for a
`pre-receive` server hook, the directory name should be `pre-receive.d`. Put the files for the hook in that directory.
1. **Make the server hook files executable** and ensure that they are owned by the Git user.
@@ -156,7 +160,7 @@ To create a global server hook for all repositories:
1. Make the hook file executable, ensure that it's owned by the Git user, and ensure it does not match the backup file
pattern (`*~`).
-If the server hook code is properly implemented, it should execute when the Git hook is next triggered. Hooks are executed in alphabetical order by filename in the hook type
+If the server hook code is properly implemented, it should execute when the Git hook is next triggered. Hooks are executed in alphabetical order by file name in the hook type
subdirectories.
## Remove server hooks for a repository