Rfaulk has submitted this change and it was merged.
Change subject: mod. _create_lock creates the lock on deploy target.
......................................................................
mod. _create_lock creates the lock on deploy target.
Change-Id: I507defab854483adb0d90a4adc5a908f576f7840
---
M sartoris/sartoris.py
1 file changed, 13 insertions(+), 2 deletions(-)
Approvals:
Rfaulk: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index c0859eb..2ce2e0a 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -240,8 +240,19 @@
def _create_lock(self):
""" Create a lock file """
- with open(self.DEPLOY_DIR + self.LOCK_FILE_HANDLE, 'wb'):
- pass
+
+ log.info('{0}::SSH Lock create.'.format(__name__))
+ os.system("ssh {0}@{1} touch {2}".format(
+ self.config['user'],
+ self.config['target'],
+ self.LOCK_FILE_HANDLE))
+
+ log.info('{0}::SSH Lock place.'.format(__name__))
+ os.system("ssh {0}@{1} mv lock {2}/{3}".format(
+ self.config['user'],
+ self.config['target'],
+ self.config['path'],
+ self.DEPLOY_DIR))
def _get_commit_sha_for_tag(self, tag):
""" Obtain the commit sha of an associated tag
--
To view, visit https://gerrit.wikimedia.org/r/69459
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I507defab854483adb0d90a4adc5a908f576f7840
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