summaryrefslogtreecommitdiff
path: root/lib/gitlab_custom_hook.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make custom hooks dir configurableSean McGivern2016-12-121-8/+10
| | | | | | | | Add a new configuration option, custom_hooks_dir. When this is set, we will look for global custom hooks in: <custom_hooks_dir>/{pre-receive,update,post-receive}.d/* When this is not set, default to <REPO_PATH>/hooks.
* avoid Dir.exists? duplication by moving the check to match_hook_filesElan Ruusamäe2016-12-011-6/+4
|
* use String.end_with? instead of regexpElan Ruusamäe2016-12-011-1/+1
|
* custom_hook: chain custom hooksElan Ruusamäe2016-12-011-11/+37
| | | | | | | | | | | | | update hooks lookup to use <hook>.d/* from repository hooks dir the order would be: 1. <repository>.git/custom_hooks/<hook_name> - per project hook 2. <repository>.git/custom_hooks/<hook_name>.d/* - per project hooks 3. <repository>.git/hooks/<hook_name>.d/* - global hooks only executable files are matched and backup files excluded (*~) and the resulting list is sorted per each lookup
* custom_hook: add support for global custom hooksDirk Hörner2016-12-011-12/+22
| | | | | | | | | | | | | This commit adds the option of having another set of global custom hooks along with the already supported repository local custom hooks. The repository local custom hook is executed first (if available). If successful, execution continues with the global custom hook (if available). This way, local custom hooks get priority over global custom hooks. Global custom hooks can be enabled by placing an executable file into the "custom_hooks" directory within gitlab-shell (create if it does not exist, yet).
* custom_hook: refactor to pull repo_path into classDirk Hörner2016-12-011-7/+8
| | | | | | This commit takes the GitlabCustomHook a bit clother to the other hook handling classes by receiving the repo_path as argument to initialize() instead of passing it to each method.
* custom_hook: only execute hook if file is executableDirk Hörner2016-12-011-1/+1
| | | | | This commit fixes an issue where an existing but unexecutable hook would cause an uncaught execption.
* Fix gitlab_custom_hook dependencies70-push-fails-because-of-missing-dependencies-on-gitlab_custom_hooksAlejandro Rodríguez2016-11-161-0/+1
|
* Add instrumentation to push hooksmore-instrumentation-down-the-pipelineAhmad Sherif2016-11-161-3/+4
| | | | Related to #22053
* added GL_IDadd_gl_idValery Sizov2016-10-051-3/+9
|
* Simplify custom hook output handlingcustom-hook-outputJacob Vosmaer2016-06-241-29/+16
|
* Move setting/unsetting of GL_ID from lib to executables.Douwe Maan2015-04-061-8/+5
|
* Enable rubocop ruleDmitriy Zaporozhets2015-03-021-2/+2
|
* Fix custom hook output and return valuesDrew Blessing2014-11-181-3/+3
|
* Fix the calls to pre- and post-receive custom hooksjkbzh2014-11-061-14/+41
| | | | | | - Reset G_ID if the custom pre-receive hook fails - Use a pipe to feed stdin to the custom pre- and post-receive hooks, in the same way that the standalone git works
* Support for custom hooksDrew Blessing2014-11-051-0/+42