Questions tagged [hook]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
2 answers
5k views

Extract data that Jenkins receives from POST hooks sent by eg. github or bitbucket

I have a Jenkins job Trigger builds remotely (e.g., from scripts), and bitbucket PULL request HOOK triggers that job we can say everything works fine. Jenkins is smart to check any change and build ...
4 votes
1 answer
1k views

Git Server Side Hook using C#

With subversion and VisualSVN I was able to put a .net binary file as the hook using c# and building the assembly. You just put a file called Post-Commit.exe in the hook folder and it works. With git ...
2 votes
1 answer
828 views

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

I would like postfix to run a external php script (a hook) every time there is a outgoing delivery error. For example, my webserver sends out emails and sometimes the recipients mailbox is full or ...
1 vote
1 answer
1k views

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

I would like to add multiple post-receive hook scripts to a git repository on my own server. For example: triggering CI, and posting to slack. How can I add more than one script?
0 votes
0 answers
311 views

Iptables service reload or restart should restart another service, like Docker

I know there is a way, I just don't remind how to. I need to have the IPTables restart the Docker service when I reload, restart the iptables. I am pretty sure there is a HOOK way to that with ...
0 votes
0 answers
708 views

Elastic beanstalk hooks are not created on the first "eb deploy" or in the new EC2 instances

With reference to the docs, http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom-platform-hooks.html http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html ...
10 votes
3 answers
22k views

Triggering Jenkins build for merge request from GitLab web hook

I want Jenkins (1.561) to build merge (pull) requests submitted to GitLab (6.7.5), triggered by a merge request web hook. I have a parameterised build, and the Jenkins plugins "GitLab Merge Request ...
6 votes
2 answers
3k views

SFTP post upload hook

How would I run a script after a file has been successfully uploaded over (a chrooted) SFTP? I have this working on standard FTP connection using PureFTP http://linux.die.net/man/8/pure-...
1 vote
1 answer
2k views

Git hook post-merge

I have a post-receive hook that create a file after a push on master branch branch_name=$(git rev-parse --symbolic --abbrev-ref $refname) if [ "master" == "$branch_name" ]; then touch OK_push.txt ...
19 votes
3 answers
42k views

How to setup Gitlab with post-receive hook?

I am using Gitlab on one server and would like to push my git repository on commit of the master branch to another webserver. So when I push a new version of the website the production server gets ...
6 votes
1 answer
2k views

GitLab CE post-commit custom hook not working

I use GitLab Community Edition 8.2 and want to add post-commit hook. I created file path_to_project.git/custom_hooks/post-commit with rights $ ls -l1 custom_hooks/post-commit -rwxr-xr-x 1 git git 45 ...
0 votes
1 answer
473 views

pm2 throws error in git hook

My Server throws an error if the following git post-receive hook is called: #!/bin/sh # pm2 start main.js --name powerapp If the command is entered by one by one into the terminal it will work. So ...
0 votes
1 answer
323 views

Build meteor app in custom GitLab hook

How do I build a meteor app (do 'meteor build .') in a GitLab custom hook? The custom hook is run by the user git who does not seem to have any possibility to run meteor build. Therefore I want to ...
1 vote
1 answer
878 views

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

I have set up a git repository for my webpage (it's simple HTML, generated from markdown by Pandoc). The repository will only be updated remotely by me, and I have successfully configured it to work ...
1 vote
0 answers
396 views

libvirt hook qemu suse12

we have this qemu hook. In suse 11 was working well but in suse 12 it is not working. The hook is setting the ports in openvswitch native-untagged. Do you know if there is some libvirt missing ...
2 votes
1 answer
3k views

Implementing and testing a Subversion hook

Background I'm trying to implement a number of commit hooks for Subversion. I have done a lot of research to try and get a simple test hook to work, however I have had no luck. For reference I have ...
17 votes
4 answers
14k views

Vim - Trigger action\script on save\write?

This might be better for super user, but I figure as a tool of the trade it might be a better topic for here. I find often when editing in vim that I exit out, run some script that I am testing, and ...
0 votes
1 answer
2k views

Postfix: Pipe to script bounces sent to specific virtual user

I'm building a small ticket system where basically some mail accounts of my email server are piped into a PHP script that will take care of the emails. The server is running, I can send email over ...
0 votes
1 answer
1k views

Run shell script as another user after git hook

I'm trying to execute a shell script that initialize the deployment of a web application after a git push. The shell script must be run as root ( or another user that is not the git user ). Searching ...
1 vote
0 answers
298 views

Getting new tags in Git Push on pre-receive

I'm using pre-receive hooks in GIT (using bash on Linux) to filter the push that are allowed into my repo. I need to filter the push that developers do into my GIT repo, allowing just pushed with ...
1 vote
0 answers
129 views

Gitlab add default post-update

we've setup Gitlab (as was described at official site). All works fine. Now we need to add git hook to new-created projects called post-update (lets say it is located at /home/git/gitolite/hook/post-...
4 votes
1 answer
7k views

How can I configure git to reject large files?

For the 3rd time a developer committed a large file in our git repository (over 100MB). It's really a pain to cleanup. How can I configure git and/or gitolite to prevent large files from ever being ...
0 votes
1 answer
2k views

sudoers nopasswd switch user and run node not working

I'm trying to prevent a password prompt on a command that runs node as the www user by adding the following line to the bottom of my /etc/sudoers file: gituser ALL=(ALL) NOPASSWD: /usr/bin/sudo -u ...
0 votes
1 answer
32 views

Is it possible de read and modify conflicted files in a svn hook

I'm wondering if it is possible to read the two merging files and modify the result in a svn hook in order to prevent a conflict I know how to fix automatically? Before a delivery, modified files are ...
0 votes
1 answer
67 views

Is there a hook that I can use to detect if one of my hard drive partitions on my server is full?

I have a server with a partition that contains all the uploaded files from my users... It gets empty after the files received are send to the CDN. Everything works. But I am worried that one day the ...
0 votes
1 answer
244 views

Virtualbox hook into host machine

I want to write a script that can add new hosts to /etc/hosts from within a virtual machine as I use VMs for web development and need to set up virtualhosts that are accessible from the host machine. ...
3 votes
3 answers
2k views

How do I use git-push --mirror with git-shell in SSH?

I am attempting to setup a mirror-to-backup hook in our repositories. The hook is executing a git push --mirror backup@server:path/foo.git. However it fails stating: fatal: What do you think I am? A ...
5 votes
2 answers
10k views

UNIX - How to give user rights over another user and so I don't need to sudo or type password?

I have 2 users in question • git user - used for gitosis - so it's a No password user and it can be accessed only through root... • user user - where my files reside so what I would like to do is ...
1 vote
2 answers
460 views

Adding SVN hooks - downtime required?

I have been asked to add a hook script to some SVN repositories. The repositories run under Apache with the mod_dav_svn module. Do I need to restart Apache in order that the hook is picked up or will ...
0 votes
1 answer
388 views

Auto update changeset hook fails with status -1 [closed]

I am using Mercurial SCM over a LAN using a normal shared folder instead of HTTP. I'm having a problem getting the auto update hook to run. I have entered this hook as detailed in the FAQ. This ...
1 vote
2 answers
1k views

git post-receive hook never executes

For some reason my post-received hook never executes. It's a simple two liner diagnostic script: echo "test" && touch /tmp/test. When I do git push origin master nothing happens. Does any-one ...
4 votes
1 answer
2k views

Update Git super repository automatically when a submodule gets updated

in our company we have a huge code base (>100000 files) and so we keep it in several git repositories. So we have a forest of repositories and one super repository containing only submodule references ...
0 votes
1 answer
712 views

Determine branch in post-update hook

I have a git (gitosis) repo where every developer have a main branch. I have a script in post-update hook that rebuild main web site and test websites for every developer on every PUSH. I want to ...
3 votes
1 answer
4k views

libvirt, qemu, reboot hook

Is it possible to detect that the guest VM has rebooted and perform an action using libvirt / qemu? The hooks here only support the "start" and "stop" events. I would like to detect if my VM has ...
3 votes
2 answers
6k views

SVN: Error validating server certificate for svn hook linux

I managed to setup a SVN (over SSL) server and TortoiseSVN client on Win. I made a Post-Commit Hook for test project. The Post-Commit will update the web dir so the App in PHP can be executed with ...
2 votes
2 answers
2k views

How can I run a python script when a new user is created in Active Directory?

For some background information: we're a Windows environment using server 2008 with AD for desktop auth. We are an online retail business; our online presence and our intranet are *nix based. When we ...
2 votes
3 answers
4k views

Problem with Email Notifications in VisualSVN Server

I have a dedicated server running windows 2003 server and Visual SVN Server 2.0.8. I'm trying to configure it to send email notifications on commit. So I found this article on Visual SVN site. It ...
3 votes
2 answers
2k views

Unix filesystem hook

I'd like to add a hook to the file system, so I can execute a process whenever a specific file is read from disk. Does *nix provide a way to create such a hook? (I have root access)
19 votes
6 answers
15k views

Git - post-receive hook with git pull "Failed to find a valid git directory"

It's very weird but when setting a git repository and creating a post-receive hook with: echo "--initializing hook--" cd ~/websites/testing echo "--prepare update--" git pull echo "--update completed-...
0 votes
1 answer
636 views

Subversion post commit hook checkout to website document root

We have Subversion running on our Debian development server. We have setup a post-commit hook to checkout the contents of the repository to /var/www/ourwebsite There are about 2GB worth of files and ...
0 votes
1 answer
388 views

Linux (CentOS) - Is there any (feasible) way to add a file write "hook"?

I have a mod_security log parsing script to load data into a mysql database which is then accessed by our Project Management System to display recent flaggings by the rulesets for our developers. The ...
2 votes
1 answer
561 views

Automatically add text on CVS Commit?

I was curious if there was a way to add a hook or something into CVS so that when you commit a text file or into CVS, it will add a certain string at the end of the file? For example, say something ...
2 votes
1 answer
2k views

svn hook script - export just branch checked in

I've set up a repository to configure my websites, the repository is /subversion/web and at the moment I have just one website controlled in /subversion/web/mywebsite I've set up a post-commit hook ...