]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Modifications for Puppet 5
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 16 Aug 2017 14:29:25 +0000 (16:29 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 16 Aug 2017 14:29:25 +0000 (16:29 +0200)
lib/webhooks/__init__.py
lib/webhooks/base_app.py
lib/webhooks/deploy.py

index 77c24cfb6902f11696a61f8bfc6ef7739a4b8e2e..a4cfd0e103eafaef3a9ca31968719ae9c9e6674d 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/env python3
 # -*- coding: utf-8 -*-
 
-__version__ = '0.5.5'
+__version__ = '0.5.6'
 
 # vim: ts=4 et list
index f19e08745c033036fb674f99f6b766f0435bef66..16632fdd307672eba04400620c28b0b6a7792b0a 100644 (file)
@@ -282,6 +282,7 @@ class BaseHookApp(object):
 
         search_path_list = [
             '/opt/pixelpark/bin',
+            '/opt/puppetlabs/puppet/bin',
             '/www/bin',
         ]
 
index 33fde3b928d4427b7b29ebbaf09e64bab869f0f2..253f59f75a150a1ffa2b4b2159dda9c62303083b 100644 (file)
@@ -89,6 +89,10 @@ class WebhookDeployApp(BaseHookApp):
                     self.projects['hiera']['name'] = cfg['name'].strip()
                 if 'parent_dir' in cfg and cfg['parent_dir']:
                     self.projects['hiera']['parent_dir'] = cfg['parent_dir']
+                if 'workdir' in cfg and cfg['workdir']:
+                    self.projects[project_key]['workdir'] = cfg['workdir']
+                if 'branch' in cfg and cfg['branch'].strip():
+                    self.projects[project_key]['branch'] = cfg['branch'].strip()
                 continue
             if project_key not in self.projects:
                 self.projects[project_key] = {}
@@ -203,6 +207,8 @@ class WebhookDeployApp(BaseHookApp):
 
         pname = 'hiera'
         parent_dir = '/www/data/puppet-hiera'
+        if self.verbose > 2:
+            LOG.debug("Got config structure for hiera:\n{}".format(pp(cfg)))
         if 'parent_dir' in cfg and cfg['parent_dir']:
             parent_dir = cfg['parent_dir']
         workdir = pname