Syntax check via update hook?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Howdy:

What's the best way to make the update hook do a syntax check?

We want to switch our Puppet [1] config repository from SVN to Git.  Our
SVN repository has a pre-commit hook that does a syntax check.  The hook
runs Puppet to check the syntax of the file(s) being committed and if the
check fails, the commit fails.  With SVN that hook runs on the server so
it's easy to have (the correct version of) the puppet binary there for
the hook to use.

Once Puppet config changes are committed to to our SVN repository they
are automatically pushed into our production Puppet config.  We want to
do something similar with Git--once commits are successfully pushed to
the master repository they are automatically pulled and become our
production Puppet config.

Git's pre-commit hook runs wherever a person happens to have checked out
the Git repository.  That could be a desktop, laptop...just about
anywhere.  It's harder to make sure the correct version of Puppet is in
all of those places.  So we'd love for the syntax check to run on the
server.  But we can't figure it out.

Thanks for any assistance!

Footnotes: 
[1]  http://reductivelabs.com/products/puppet/

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]