Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

puppet pre-receive hook

View pre-receive
1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash
 
while read old_sha1 new_sha1 refname anothervalue ; do
list=$(git show --pretty="format:" --name-only $new_sha1 | grep -e ".pp$")
for tmpfile in ${list}; do
git show ${new_sha1}:${tmpfile} | puppet --color=false --confdir=/tmp --vardir=/tmp --parseonly --ignoreimport
if [ "$?" -ne "0" ]; then exit 1; fi
done
done
 
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.