I’ve read about global custom hooks in documentation (https://docs.gitlab.com/ee/administration/custom_hooks.html#chained-hooks-support). But some issues aren’t clear enaough for me.
- Can I create symlink from some folder to .git/custom_hooks/? If not, why?
- In what order are hooks from .git/custom_hooks/<hook_name>.d/* and .git/hooks/<hook_name>.d/* run?
- Where I should create global custom hooks? Documentation says about: .git/hooks/<hook_name>.d/. In /opt/gitlab/embedded/service/gitlab-shell/hooks/<hook_name>.d/? If I create them here, won’t next GitLab upgrade overwrite them?
I’d like to create one location with many scripts run in loop as different hooks (just like in this solution http://stackoverflow.com/questions/8730514/chaining-git-hooks/8734391#8734391) and in each project make custom_hooks folder as a symlink from that earlier mentioned location. And I’d like to make it only for few groups (it would be automated by system hooks for new projects), no for every project (as global custom hooks).
I will appreciate any help.