Integrity Git post-receive Hook
I host a few of my repositories myself, rather than on GitHub. As a result I can’t take advantage of their marvelous post-commit hook support. Instead, when it comes to informing Integrity of new commits, I have to use a custom Git post-commit hook.
Use the following in /path/to/repo/.git/hooks/post-receive
changing the login credentials, URL, and project name as necessary. Make sure the script is executable.
#!/bin/sh
# Username and password not needed if publicly accessible.
curl -d '' http://USERNAME:PASSWORD@example.com/PROJECT_NAME/builds
echo "\n\n=========="
echo " Received push and alerted Integrity"
echo "==========\n\n"
Now whenever I push to the remote repo, Integrity is informed and grabs all the new commits to run the test suite against them. This could also work as a post-commit hook, if your Integrity CI server pulls from your local working repository.