How to use global custom hooks and custom_hooks_dir attribute


I’m using Gitlab 9.15.1 on RHEL 6.

I’m having an issue trying to use global custom hooks. Indeed, i’v tried to use attribute custom_hooks_dir in gitlab.rb file like this (and done reconfigure) :

gitlab_shell[‘custom_hooks_dir’] = “/applis/git/gitlab/custom_hooks/”

custom_hooks owner is git

drwxr-xr-x 3 git git 4096 Dec 28 14:44 custom_hooks

And i have update file in this directory (still owned by git)

-rwxr-xr-x 1 git git 5034 Dec 28 14:44 update

And in case just chained hook work i’ve created a hook_server_side.1 directory with the same update file

drwxrwxr-x 2 git git 4096 Dec 28 14:23 hook_server_side.1

When i push to a repository, nothing happens.

Am I missing something ?

Thanks in advance.


Global custom hooks can only be written in the chained style, so you need to have custom_hooks/update.d/my-hook, not custom_hooks/update.