forked from cerc-io/stack-orchestrator
Add --config-ref flag. (#939)
Add a flag to re-use config. Reviewed-on: cerc-io/stack-orchestrator#939 Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com> Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
This commit is contained in:
parent
fa21ff2627
commit
a54072de6c
@ -49,6 +49,7 @@ def fatal(msg: str):
|
|||||||
required=True,
|
required=True,
|
||||||
)
|
)
|
||||||
@click.option("--env-file", help="environment file for webapp")
|
@click.option("--env-file", help="environment file for webapp")
|
||||||
|
@click.option("--config-ref", help="The ref of an existing config upload to use.")
|
||||||
@click.option(
|
@click.option(
|
||||||
"--make-payment",
|
"--make-payment",
|
||||||
help="The payment to make (in alnt). The value should be a number or 'auto' to use the deployer's minimum required payment.",
|
help="The payment to make (in alnt). The value should be a number or 'auto' to use the deployer's minimum required payment.",
|
||||||
@ -69,6 +70,7 @@ def command(
|
|||||||
app,
|
app,
|
||||||
deployer,
|
deployer,
|
||||||
env_file,
|
env_file,
|
||||||
|
config_ref,
|
||||||
make_payment,
|
make_payment,
|
||||||
use_payment,
|
use_payment,
|
||||||
dns,
|
dns,
|
||||||
@ -86,7 +88,8 @@ def command(
|
|||||||
if not deployer_record:
|
if not deployer_record:
|
||||||
fatal(f"Unable to locate deployer: {deployer}")
|
fatal(f"Unable to locate deployer: {deployer}")
|
||||||
|
|
||||||
config_ref = None
|
if env_file and config_ref:
|
||||||
|
fatal("Cannot use --env-file and --config-ref at the same time.")
|
||||||
|
|
||||||
# If env_file
|
# If env_file
|
||||||
if env_file:
|
if env_file:
|
||||||
@ -132,9 +135,7 @@ def command(
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"name": f"{app_record.attributes.name}@{app_record.attributes.version}",
|
"name": f"{app_record.attributes.name}@{app_record.attributes.version}",
|
||||||
"deployer": deployer,
|
"deployer": deployer,
|
||||||
"meta": {
|
"meta": {"when": str(datetime.utcnow())},
|
||||||
"when": str(datetime.utcnow())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user