Hashar has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/93939


Change subject: beta: auto update Parsoid dependencies using npm
......................................................................

beta: auto update Parsoid dependencies using npm

The Parsoid daemon relies on JavaScript dependencies defined in
mediawiki/extensions/Parsoid.git in /js/package.json.

In production they are hold in a private repository on tin.eqiad.wmnet
under /srv/deployment/parsoid/config. For beta we are simply going to
brute force 'npm install' whenever the beta-code-update job is running.

I forced the color parameter since Jenkins is smart enough to translate
ANSI escape codes to HTML, providing a better user experience.

Change-Id: If831732b333c7bd825b0f80628af1d28e3b4bf2e
---
M files/misc/beta/wmf-beta-autoupdate.py
M manifests/misc/beta.pp
2 files changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/93939/1

diff --git a/files/misc/beta/wmf-beta-autoupdate.py 
b/files/misc/beta/wmf-beta-autoupdate.py
index bf684d6..044c38f 100755
--- a/files/misc/beta/wmf-beta-autoupdate.py
+++ b/files/misc/beta/wmf-beta-autoupdate.py
@@ -12,6 +12,7 @@
 
 import argparse
 import logging
+import os.path
 import subprocess
 import sys
 
@@ -52,6 +53,7 @@
         pull_mediawiki(),
         pull_extensions(),
         update_extensions(),
+        update_parsoid_deps(),
         update_l10n(),
     ]
     logger.info("Executions completed %s", exit_codes)
@@ -104,6 +106,13 @@
         'git', 'submodule', 'update', '--init', '--recursive'])
 
 
+def update_parsoid_deps():
+    """Fetch parsoid Javascript dependencies using npm"""
+    parsoid_path = os.path.join(PATH_MWEXT, 'Parsoid/js')
+    return runner(name='parsoid-deps', path=parsoid_path, cmd=[
+        'npm', 'install', '--verbose', '--color', 'always'])
+
+
 def update_l10n():
     """Localisation cache update"""
     return runner(name='mw-update-l10n', cmd=['mw-update-l10n'])
diff --git a/manifests/misc/beta.pp b/manifests/misc/beta.pp
index fb6770b..5655583 100644
--- a/manifests/misc/beta.pp
+++ b/manifests/misc/beta.pp
@@ -2,6 +2,11 @@
 
        require misc::deployment::common_scripts
 
+       # Parsoid JavaScript dependencies are updated on beta via npm
+       package { 'npm':
+               ensure => present,
+       }
+
        file {
                # Old shell version
                "/usr/local/bin/wmf-beta-autoupdate":

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If831732b333c7bd825b0f80628af1d28e3b4bf2e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to