2 '''hosting library functions and static variables''' 10 return '%s-%s:%s' % (os.environ[
'PROJECT_NAME'], ident,
11 os.environ[
'BRANCH_TAG'])
15 (image_name(
'app-web'),
'odyssey_web2'),
16 (image_name(
'tool-cumanage'),
'odyssey_tool_cumanage'),
17 (image_name(
'infra-sslredirect'),
'odyssey_infra_sslredirect'),
18 (image_name(
'infra-webproxy'),
'odyssey_infra_webproxy'),
19 (image_name(
'infra-auth'),
'odyssey_infra_auth'),
20 (image_name(
'infra-dbadmin'),
'odyssey_infra_dbadmin'),
21 (image_name(
'infra-pgweb'),
'odyssey_infra_pgweb'),
22 (image_name(
'sched'),
'odyssey_sched'),
25 REPOSITORIES = [x[1]
for x
in IMAGES]
28 "us-west-2":
"265109528935.dkr.ecr.us-west-2.amazonaws.com",
29 "us-east-1":
"265109528935.dkr.ecr.us-east-1.amazonaws.com",
30 "us-east-2":
"265109528935.dkr.ecr.us-east-2.amazonaws.com",
33 OAUTH2_APPLICATIONS = {
35 (
"279940059458-hmr916apslukcam4e7gis35cv43ltvbs" 36 ".apps.googleusercontent.com"),
37 "_vRZb2IFq6YcC_Kb6RnYhpE_"),
39 (
"279940059458-it66d93lhobeut84dgj202okv8l1man1" 40 ".apps.googleusercontent.com"),
41 "HSH0rr3axm5Kh0rysJUc03Ju"),
46 '''Return oauth2 tuple for domain''' 47 if len(domain.split(
'.')) > 2:
48 key =
'.'.join(domain.split(
'.')[1:])
51 return OAUTH2_APPLICATIONS[key]
54 def cmd(*args, verbose=False):
55 cmd =
' '.join(map(str, args))
56 shellish.vtmlprint(
"<b>Running:</b> <blue>%s</blue>" % cmd)
59 subprocess.check_call(cmd, shell=
True)
def get_client_oauth_data(domain)