]> Frank Brehm's Git Trees - pixelpark/puppetmaster-webhooks.git/commitdiff
Changing debug output
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 28 Oct 2022 14:53:57 +0000 (16:53 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 28 Oct 2022 14:53:57 +0000 (16:53 +0200)
lib/webhooks/deploy.py

index 28ff8fa1ef583edd0489a095b518c1d391fdee34..c013ae7899fed3112f4fe022ccb184ef2619e806 100644 (file)
@@ -179,18 +179,24 @@ class WebhookDeployApp(BaseHookApp):
                 cfg['name'] = project_key
             full_name = ns + '/' + pname
 
+            # if self.verbose > 1:
+            LOG.info("Searching for {n!r} branch {b!r} in config ...".format(
+                n=self.full_name, b=self.ref))
+
+            if self.full_name != full_name:
+                # if self.verbose > 1:
+                LOG.info("Project {k!r} => {n!r} does not match.".format(
+                    k=project_key, n=full_name))
+                continue
+
             if 'branch' in cfg:
                 if self.ref.lower() != cfg['branch'].lower():
                     LOG.debug("Wrong branch in working dir {cfb!r} - wanted {hb!r}.".format(
                         cfb=cfg['branch'], hb=self.ref))
                     continue
 
-            if self.verbose > 1:
-                LOG.debug("Checking for {!r} ...".format(full_name))
-
-            if self.full_name == full_name:
-                LOG.debug("Found project {!r}.".format(full_name))
-                return self.deploy(cfg)
+            LOG.info("Found project {!r}.".format(project_key))
+            return self.deploy(cfg)
 
         msg = _("Could not find a definition for project {!r}.").format(self.full_name)
         self.error_data.append(msg)