-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathTiltfile.global
More file actions
31 lines (24 loc) · 896 Bytes
/
Tiltfile.global
File metadata and controls
31 lines (24 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
### Helpers Start ###
def getAbsoluteDir(relativeDir):
return str(local('mkdir -p {dir} && cd {dir} && pwd'.format(dir=relativeDir))).strip()
def getNested(dict, path, fallback=None):
value = dict
for path_segment in path.split('.'):
value = value.get(path_segment, {})
return value or fallback
def getHelmValuesFile():
return './Tiltconfig.yaml'
def getHelmOverridesFile():
tidepool_helm_overrides_file = getHelmValuesFile()
localOverrides = read_yaml('./local/Tiltconfig.yaml', False)
if type(localOverrides) == 'dict':
tidepool_helm_overrides_file = './local/Tiltconfig.yaml'
return tidepool_helm_overrides_file
def getConfig():
config = read_yaml(getHelmValuesFile())
overrides = read_yaml(getHelmOverridesFile())
config.update(overrides)
return config
def isShutdown():
return bool(int(str(local('printf ${SHUTTING_DOWN-0}'))))
### Helpers End ###