0

I have a private gitlab repository in our company and we had a code verification script on pre-receive in order to assure that no code syntax errors(php) were pushed to the repo.

Recently we've decided to update the gitlab version to a newer one and it looks like the hook system was changed. Now the pre-receive script contains the following:

The gitlab-shell hooks have been migrated to Gitaly

I tried to update the file without any success, after some search I found that now there is a only global script(not a repository specific) that is executed by the system found here

/opt/gitlab/embedded/service/gitaly-ruby/git-hooks

which executes a binary file called gitaly-hooks which I don't know how it works. I tried to find documentation but I can't make any sense of it.

How do I implement a pre-receive hook in gitaly for a specific repository?

Sinjuice
  • 131

1 Answers1

0

I managed to add the hook, the issue was me not understanding well the documentation.

I had to create a folder called custom_hooks under the repo folder and add there the pre-receive hook. Now everything works just fine.

Sinjuice
  • 131