Hot answers tagged

8 votes
Accepted

GitLab CE post-commit custom hook not working

post-commit is a client-side hook and you can not implement it on server. According to Gitlab documentation: http://doc.gitlab.com/ce/hooks/custom_hooks.html, you can implement a server-side custom ...
  • 8,941
5 votes

How to add multiple post-receive hooks to a git repository?

You can only have one post-receive script, so you'll have to use that one to call multiple scripts. On the server in the /PATH/TO/GIT.git/hooks/post-receive file, put the following: #!/bin/bash ...
  • 231
3 votes
Accepted

Can't call "git reset" inside git post-update hook?

I have found the problem! During execution of the hook, the variables GIT_DIR and GIT_WORK_TREE are set, and git will ignore the current directory. And it seems that I can pass the directories ...
  • 153
1 vote

How do I get Postfix to run a script every time there is a outgoing delivery error?

I ended up rerouting rsyslog maillog notifications via UDP to a simple php daemon for processing and doing all the magic there. The bounce-daemon.php is controlled by monit, so it's always up and ...
1 vote

Git hook post-merge

If you read through the list of available hooks, you see that there is a post-merge hook... ...but it's not clear from your question that this will do what you want. A post-receive hook runs on a ...
  • 42.8k
1 vote
Accepted

Build meteor app in custom GitLab hook

su - user starts an interactive shell with the user user. You're going to want to use the following: su -c "cd \"$DEPLOYDIR\"; meteor build ." nodejs Dissection: su: su executable -c "COMMAND": run ...

Only top scored, non community-wiki answers of a minimum length are eligible