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/04/12 09:27:37 UTC
[incubator-datalab] branch DATALAB-2091 updated: [DATALAB-2091]:
added error handling during back-end 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 bd791b2 [DATALAB-2091]: added error handling during back-end build
bd791b2 is described below
commit bd791b25f57af235d568eb7ed506058483af3d27
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Mon Apr 12 12:27:20 2021 +0300
[DATALAB-2091]: added error handling during back-end build
---
infrastructure-provisioning/src/ssn/scripts/configure_ui.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
index 8c039c9..49d92f1 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
@@ -158,9 +158,13 @@ def build_ui():
conn.sudo('sudo chown -R {} {}/*'.format(args.os_user, args.datalab_path))
# Building Back-end
- conn.sudo('bash -c "cd {}sources/ && /opt/maven/bin/mvn -P{} -DskipTests package 2>&1 > /tmp/maven.log"'.format(args.datalab_path, args.cloud_provider))
- conn.run('if ! grep -w -E "(ERROR)" /tmp/maven.log > /tmp/maven_error.log; then echo "no_error" > /tmp/maven_error.log;fi')
- conn.run('cat /tmp/maven_error.log')
+ try:
+ conn.sudo('bash -c "cd {}sources/ && /opt/maven/bin/mvn -P{} -DskipTests package 2>&1 > /tmp/maven.log"'.format(args.datalab_path, args.cloud_provider))
+ except:
+ conn.run('if ! grep -w -E "(ERROR)" /tmp/maven.log > /tmp/maven_error.log; then echo "no_error" > /tmp/maven_error.log;fi')
+ conn.run('cat /tmp/maven_error.log')
+ print('Failed to build Back-end: ', str(err))
+ sys.exit(1)
conn.sudo('mkdir -p {}webapp/'.format(args.datalab_path))
for service in ['self-service', 'provisioning-service', 'billing']:
conn.sudo('mkdir -p {}webapp/{}/lib/'.format(args.datalab_path, service))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org