From 6f986e4828dd19169e6eb952e036ced2eeeaf6ca Mon Sep 17 00:00:00 2001 From: echyam Date: Tue, 17 Sep 2019 10:19:42 -0700 Subject: [PATCH] fixed dockerfile url from git repo --- submit_jobs/submit_jobs/handlers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/submit_jobs/submit_jobs/handlers.py b/submit_jobs/submit_jobs/handlers.py index 1ed42a9c..59351686 100644 --- a/submit_jobs/submit_jobs/handlers.py +++ b/submit_jobs/submit_jobs/handlers.py @@ -131,12 +131,12 @@ def get(self,**params): # proj_path = '/'.join(proj_path.split('/')[:-1]) # os.chdir(proj_path) # git_url = subprocess.check_output("git remote get-url origin", shell=True).decode('utf-8').strip() - logging.debug('repo url is {}'.format(repo_url)) - # params['repo_url'] = git_url + logging.debug('repo url is {}'.format(params['repo_url'])) + # params['[repo_url]'] = git_url # TODO: need way to build registry url instead of hardcoded # user doesn't need to know how to make this parameter - image_name = repo_url.split('https://')[1].split('.git')[0] # slice off `https://` prefix and `.git` suffix + image_name = 'registry.nasa.maap'+(params['repo_url'].split('.git')[0]).split('repo.nasa.maap')[1] # slice off `https://` prefix and `.git` suffix image_tag = 'master' params['docker_url'] = '{}:{}'.format(image_name,image_tag) # params['docker_url'] = os.environ['DOCKERIMAGE_PATH']