This is an automated email from the ASF dual-hosted git repository.
dmysakovets pushed a commit to branch odahu-integration
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/odahu-integration by this push:
new 0b38369 [odahu-integration] Added print functions for testing purpose
0b38369 is described below
commit 0b38369eec7c0def37a1c7caf77b7e53ca38c1b3
Author: Demyan Mysakovets <[email protected]>
AuthorDate: Tue Mar 17 17:18:33 2020 +0200
[odahu-integration] Added print functions for testing purpose
---
.../src/ssn/scripts/configure_docker.py | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index d21e115..8825a43 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -81,13 +81,20 @@ def add_china_repository(dlab_path):
sudo('sed -i "22i COPY general/files/os/debian/sources.list
/etc/apt/sources.list" Dockerfile')
def login_in_gcr(gcr_creds):
- with open('/tmp/dlab-gcr-ro-sa', 'w') as f:
- f.write(gcr_creds)
- local('scp -i {} /tmp/dlab-gcr-ro-sa
{}:/tmp/dlab-gcr-ro-sa'.format(args.keyfile, env.host_string))
- sudo('cat /tmp/dlab-gcr-ro-sa | base64 --decode >
/tmp/dlab-gcr-ro-sa.json')
- sudo('cat /tmp/dlab-gcr-ro-sa.json | docker login -u _json_key
--password-stdin https://gcr.io')
+ try:
+ with open('/tmp/dlab-gcr-ro-sa', 'w') as f:
+ f.write(gcr_creds)
+ local('scp -i {} /tmp/dlab-gcr-ro-sa
{}:/tmp/dlab-gcr-ro-sa'.format(args.keyfile, env.host_string))
+ sudo('cat /tmp/dlab-gcr-ro-sa | base64 --decode >
/tmp/dlab-gcr-ro-sa.json')
+ sudo('cat /tmp/dlab-gcr-ro-sa.json | docker login -u _json_key
--password-stdin https://gcr.io')
+ print("Login in gcr has been completed")
+ except Exception as err:
+ traceback.print_exc()
+ print('Failed to prepare odahu image: ', str(err))
+ sys.exit(1)
def build_docker_images(image_list, region, dlab_path):
+ print("Building docker images")
try:
if os.environ['conf_cloud_provider'] == 'azure':
local('scp -i {} /root/azure_auth.json
{}:{}sources/infrastructure-provisioning/src/base/'
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]