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

commit eb69af14e45a06bb541ff16ea6285fe7f34aa63f
Author: leonidfrolov <[email protected]>
AuthorDate: Wed May 5 17:25:46 2021 +0300

    [DATALAB-2386]: added jars download from the repository instead of build
---
 .../src/ssn/scripts/configure_ui.py                | 27 ++++++++++++++++------
 1 file changed, 20 insertions(+), 7 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
index 5415491..d7e1ca5 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
@@ -159,13 +159,26 @@ def build_ui():
         conn.sudo('sudo chown -R {} {}/*'.format(args.os_user, 
args.datalab_path))
 
         # Building Back-end
-        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)
+        if 'repository_user' in os.environ and 'repository_pass' in os.environ 
and 'repository_address' in os.environ:
+            conn.sudo(
+                'wget -P {}sources/services/provisioning-service/target/  
--user={} --password={} 
https://{}/repository/packages/provisioning-service-2.4.jar 
--no-check-certificate'
+                     .format(args.datalab_path, os.environ['repository_user'], 
os.environ['repository_pass'], os.environ['repository_address']))
+            conn.sudo(
+                'wget -P {}sources/services/self-service/target/  --user={} 
--password={} https://{}/repository/packages/self-service-2.4.jar 
--no-check-certificate'
+                .format(args.datalab_path, os.environ['repository_user'], 
os.environ['repository_pass'],
+                        os.environ['repository_address']))
+            conn.sudo(
+                'wget -P {0}sources/services/billing-{4}/target/  --user={1} 
--password={2} https://{3}/repository/packages/billing-{4}-2.4.jar 
--no-check-certificate'
+                .format(args.datalab_path, os.environ['repository_user'], 
os.environ['repository_pass'],
+                        os.environ['repository_address'], args.cloud_provider))
+        else:
+            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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to