Showing with 5 additions and 4 deletions.
  1. +2 −0 CHANGELOG
  2. +1 −1 Modulefile
  3. +2 −3 files/webhook
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2.2.4 - Adam Crews
* Fix for invalid webhook typo syntax and updates for using stash
2.2.3 - Zack Smith
* Functional prefix support for webhook
2.2.3 - Zack Smith
Expand Down
2 changes: 1 addition & 1 deletion Modulefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name 'zack-r10k'
version '2.2.4'
version '2.2.5'
source 'https://github.com/acidprime/r10k'
author 'zack'
license 'Apache License, Version 2.0'
Expand Down
5 changes: 2 additions & 3 deletions files/webhook
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ ENV['HOME'] = '/var/lib/peadmin'
ENV['PATH'] = '/sbin:/usr/sbin:/bin:/usr/bin:/opt/puppet/bin'

$logger = WEBrick::Log::new($config['access_logfile'], WEBrick::Log::DEBUG)
$mco_logfile = $config['mco_logfile']

opts = {
:Port => $config['port'],
Expand Down Expand Up @@ -97,8 +96,8 @@ class Server < Sinatra::Base
raise result.results[:statusmsg]
end
else
message = "triggered: mco r10k deploy #{branch}"
Process.detach(fork{ exec "/opt/puppet/bin/mco r10k deploy #{branch} >> #{mco_logfile} 2>&1 &"})
message = "triggered: /opt/puppet/bin/mco r10k deploy #{branch} >> #{$config['mco_logfile']} 2>&1 &"
Process.detach(fork{ exec "/opt/puppet/bin/mco r10k deploy #{branch} >> #{$config['mco_logfile']} 2>&1 &"})
end
$logger.info("message: #{message} branch: #{branch}")
{:status => :success, :message => message.to_s }.to_json
Expand Down