forked from cerc-io/stack-orchestrator
Support external stack file (#650)
This commit is contained in:
1 parent
4ae4d3b61d
commit
638fa01649
5 files changed
+68
-15
No files matched your search
@@ -150,6 +150,12 @@ def get_parsed_deployment_spec(spec_file):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def stack_is_external(stack: str):
|
||||
# Bit of a hack: if the supplied stack string represents
|
||||
# a path that exists then we assume it must be external
|
||||
return Path(stack).exists() if stack is not None else False
|
||||
|
||||
|
||||
def get_yaml():
|
||||
# See: https://stackoverflow.com/a/45701840/1701505
|
||||
yaml = ruamel.yaml.YAML()
|
||||
@@ -167,3 +173,8 @@ def global_options(ctx):
|
||||
# TODO: hack
|
||||
def global_options2(ctx):
|
||||
return ctx.parent.obj
|
||||
|
||||
|
||||
def error_exit(s):
|
||||
print(f"ERROR: {s}")
|
||||
sys.exit(1)
|
||||
Reference in new issue
Block a user