You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/02/25 09:14:28 UTC

[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]: changed npm build

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/DATALAB-2091 by this push:
     new 7711002  [DATALAB-2091]: changed npm build
7711002 is described below

commit 7711002d0cf2c5af74bb33d9e6ae8007d43b5dca
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Thu Feb 25 10:48:04 2021 +0200

    [DATALAB-2091]: changed npm build
---
 infrastructure-provisioning/src/general/lib/os/fab.py       | 4 ++--
 infrastructure-provisioning/src/ssn/scripts/configure_ui.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index f34aa23..e108700 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -598,7 +598,7 @@ def ensure_toree_local_kernel(os_user, toree_link, scala_kernel_path, files_dir,
 def install_ungit(os_user, notebook_name, edge_ip):
     if not exists(conn,'/home/{}/.ensure_dir/ungit_ensured'.format(os_user)):
         try:
-            manage_npm_pkg('-g install ungit@{}'.format(os.environ['notebook_ungit_version']))
+            manage_npm_pkg('npm -g install ungit@{}'.format(os.environ['notebook_ungit_version']))
             conn.put('/root/templates/ungit.service', '/tmp/ungit.service')
             conn.sudo("sed -i 's|OS_USR|{}|' /tmp/ungit.service".format(os_user))
             http_proxy = conn.run('echo $http_proxy').stdout.replace('\n','')
@@ -1001,7 +1001,7 @@ def manage_npm_pkg(command):
                         conn.sudo('npm config set registry {}'.format(npm_registry[0]))
                     else:
                         conn.sudo('npm config set registry {}'.format(npm_registry[1]))
-                    conn.sudo('npm {}'.format(command))
+                    conn.sudo('{}'.format(command))
                     installed = True
                 except:
                     npm_count += 1
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
index ebbdf44..19c2652 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
@@ -154,7 +154,7 @@ def build_ui():
                     '\'use_ldap\': false'))
 
         conn.sudo('bash -c "cd {}/sources/services/self-service/src/main/resources/webapp/ && echo "N" | npm install"'.format(args.datalab_path))
-        manage_npm_pkg('run build.prod')
+        manage_npm_pkg('bash -c "cd {}/sources/services/self-service/src/main/resources/webapp/ && npm run build.prod"'.format(args.datalab_path))
         conn.sudo('sudo chown -R {} {}/*'.format(args.os_user, args.datalab_path))
 
         # Building Back-end


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org