Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/111678
Change subject: fold 'sync-wikiversions' into scappy
......................................................................
fold 'sync-wikiversions' into scappy
Replaces the invocation of the shell script 'sync-wikiversions' with the two
operations it comprises: building the versions CDB file and syncing it to all
deployment hosts.
Change-Id: I2195835ccc17aaf8f4fa8d345a785bc190055e2e
---
M bin/scappy
1 file changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap
refs/changes/78/111678/1
diff --git a/bin/scappy b/bin/scappy
index 9f25b37..96196bd 100755
--- a/bin/scappy
+++ b/bin/scappy
@@ -130,7 +130,7 @@
return subprocess.check_call(cmd.split() + list(paths))
-def parse_args():
+def parse_args(config):
"""Parse command-line arguments."""
parser = argparse.ArgumentParser(description='Deploy MediaWiki')
parser.add_argument('--versions', type=lambda v: set(v.split()))
@@ -140,7 +140,7 @@
if 'active' in args.versions:
args.versions.remove('active')
args.versions.update(get_branches(
- '%(MW_COMMON)s/wikiversions.cdb' % config)
+ '%(MW_COMMON)s/wikiversions.cdb' % config))
return args
@@ -149,7 +149,7 @@
start = time.time()
config = get_config()
- args = parse_args()
+ args = parse_args(config)
env = {}
if args.version:
env['MW_VERSIONS_SYNC'] = ' '.join(args.versions)
@@ -193,7 +193,11 @@
os.remove(tmp.name)
log.debug('building wikiversions.cdb')
- subprocess.check_call('sync-wikiversions')
+ subprocess.check_call('%(MW_COMMON_SOURCE)s/multiversion/'
+ 'refreshWikiversionsCDB' % config)
+ dsh('sudo -u mwdeploy rsync -l %(MW_RSYNC_HOST)s::common/'
+ 'wikiversions.{dat,cdb} %(MW_COMMON)s' % config,
+ 'mediawiki-installation')
duration = time.time() - start
--
To view, visit https://gerrit.wikimedia.org/r/111678
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2195835ccc17aaf8f4fa8d345a785bc190055e2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits