acidprime/r10k — pull request #112 by malnick (2014-12-18 00:52:09+00:00)
Title: Jeffs webhook

Updated the webhook, you can cherry pick whatever, if anything, you want. Added support for SSL since my hook resides on a public facing interface. Added support to verify a github.com secret token (also available in enterprise and stash).

Added two new routes to the existing deploy environment:

### deploy_r10k
This route accepts a POST from github and is only actuated via the control.git repo. It's already implemented, you probably don't want to use this since yours uses the actual MCollective lib to implement this across all puppet masters if you have a cluster. I didn't, and didn't want to rely on MCollective to run r10k.

This route parses the ref for the branch being pushed to on control.git which is in fact the corrosponding Puppet environment. It then runs:

r10k deploy environment #{branch_name} --puppetfile -v debug -t

Metrics such as sha1 hash for the commit, the user pushing and associated contact info, the branch/enviro being deployed are logged to logs/session.log

### pull_hiera
This route accepts a POST from github and is only actuated via puppet-configuration.git repo.

This route parses the POST for the sha1 hash for the commit, the user pushing and associated contact info, the branch/enviro being deployed are logged to logs/session.log

It then does a git pull on:

$confdir/data

On branch production only.

### update_module
This route accepts a POST from github and can be actuated by any puppet module repo.

This route parses the POST for the module name, the sha1 hash for the commit, the user pushing and associated contact info, the branch/enviro being deployed are logged to logs/session.log

It then runs the r10k module utility:

r10k deploy module #{module_name} -v debug -t