Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
c65a8552
Commit
c65a8552
authored
Dec 07, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'patch-6' into 'master'
Update custom_hooks.md for chained hooks support See merge request !6721
parents
34fc5b05
bc380e48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
doc/administration/custom_hooks.md
doc/administration/custom_hooks.md
+20
-0
No files found.
doc/administration/custom_hooks.md
View file @
c65a8552
...
...
@@ -42,6 +42,25 @@ Follow the steps below to set up a custom hook:
That's it! Assuming the hook code is properly implemented the hook will fire
as appropriate.
## Chained hooks support
> [Introduced][93] in GitLab Shell 4.1.0.
The hooks could be also placed in
`hooks/<hook_name>.d`
(global) or
`custom_hooks/<hook_name>.d`
(per project)
directories supporting chained execution of the hooks.
The hooks are searched and executed in this order:
1.
`<project>.git/hooks/`
- symlink to
`gitlab-shell/hooks`
global dir
1.
`<project>.git/hooks/<hook_name>`
- executed by
`git`
itself, this is
`gitlab-shell/hooks/<hook_name>`
1.
`<project>.git/custom_hooks/<hook_name>`
- per project hook (this is already existing behavior)
1.
`<project>.git/custom_hooks/<hook_name>.d/*`
- per project hooks
1.
`<project>.git/hooks/<hook_name>.d/*`
- global hooks: all executable files (minus editor backup files)
Files in
`.d`
directories need to be executable and not match the backup file pattern (
`*~`
).
The hooks of the same type are executed in order and execution stops on the first
script exiting with non-zero value.
## Custom error messages
> [Introduced][5073] in GitLab 8.10.
...
...
@@ -54,3 +73,4 @@ STDERR takes precedence over STDOUT.
[
hooks
]:
https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#Server-Side-Hooks
[
5073
]:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5073
[
93
]:
https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/93
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment