Rfaulk has submitted this change and it was merged.

Change subject: mod - _default_sync, call hooks.
......................................................................


mod - _default_sync, call hooks.

Change-Id: I020d3d4908c7086176b99130a1c844ad1a11e911
---
M sartoris/sartoris.py
1 file changed, 18 insertions(+), 13 deletions(-)

Approvals:
  Rfaulk: Verified; Looks good to me, approved



diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index 3d176cd..474274c 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -493,26 +493,31 @@
     def _default_sync(self):
 
         #
-        # git push origin master
+        # Call deploy hook on client
+        #
+        #   {% PATH %}/.git/deploy/hooks/default-client-push origin master
+        #
         log.info('{0} :: Calling default sync - '
                  'pushing changes ... '.format(__name__))
-        proc = subprocess.Popen(['git', 'push',
-                                 self.config['remote'],
-                                 self.config['branch']])
+
+        proc = subprocess.Popen(['{0}{1}default-client-push'.format(
+            self.config['client-path'], self.config['hook-dir']
+        ), self.config['remote'], self.config['branch']])
         proc_out = proc.communicate()[0]
         log.info(proc_out)
 
-        # ssh user@remote git pull origin master
+        # TODO - push tags
+
+        #
+        # Call deploy hook on remote
+        #
+        #   {% PATH %}/.git/deploy/hooks/default-client-pull origin master
+        #
         log.info('{0} :: Calling default sync - '
                  'pulling to target'.format(__name__))
-        proc = subprocess.Popen(['ssh',
-                                 '{0}@{1}'.format(
-                                     self.config['user'],
-                                     self.config['target']
-                                 ),
-                                 'git', 'pull',
-                                 self.config['remote'],
-                                 self.config['branch']])
+        proc = subprocess.Popen(['{0}{1}default-client-pull'.format(
+            self.config['path'], self.config['hook-dir']
+        ), self.config['remote'], self.config['branch']])
         proc_out = proc.communicate()[0]
         log.info(proc_out)
 

-- 
To view, visit https://gerrit.wikimedia.org/r/83021
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I020d3d4908c7086176b99130a1c844ad1a11e911
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk <rfaulk...@wikimedia.org>
Gerrit-Reviewer: Rfaulk <rfaulk...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to