Handle global custom hooks for gitlab-shell
https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/111 adds global hooks to gitlab-shell, as well as some other things.
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6721 adds docs for these to GitLab CE. Quoting from there:
The hooks are searched and executed in this order:
<project>.git/hooks/
- symlink togitlab-shell/hooks
global dir<project>.git/hooks/<hook_name>
- executed bygit
itself, this isgitlab-shell/hooks/<hook_name>
<project>.git/custom_hooks/<hook_name>
- per project hook (this is already existing behavior)<project>.git/custom_hooks/<hook_name>.d/*
- per project hooks<project>.git/hooks/<hook_name>.d/*
- global hooks: all executable files (minus editor backup files)
It's the last one of these that we'd like to have some kind of support for in Omnibus. I'm not sure what the best way to do this is. Maybe a directory containing {pre-receive,update,post-receive}.d
can be referenced in the configuration, and symlinks to any of those child directories can be created in the gitlab-shell/hooks
directory? That might be a bad idea, I just want to provide one example
/cc @dirker