Rfaulk has submitted this change and it was merged.
Change subject: add - basic structure of default sync, push from local, pull on
target.
......................................................................
add - basic structure of default sync, push from local, pull on target.
Change-Id: If09bcef4f98b73af2a4c4f7cd45060838f227843
---
M sartoris/sartoris.py
1 file changed, 26 insertions(+), 1 deletion(-)
Approvals:
Rfaulk: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index a7b08da..53dec76 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -479,7 +479,32 @@
return 0
def _default_sync(self):
- pass
+
+ #
+ # git 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_out = proc.communicate()[0]
+ log.info(proc_out)
+
+ # ssh user@remote git 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_out = proc.communicate()[0]
+ log.info(proc_out)
+
+ return
def resync(self, args):
"""
--
To view, visit https://gerrit.wikimedia.org/r/81632
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If09bcef4f98b73af2a4c4f7cd45060838f227843
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk <[email protected]>
Gerrit-Reviewer: Rfaulk <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits