From c0302492da33550c8695986f28cd33b8470b35c6 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 27 Aug 2024 17:32:15 -0500 Subject: [PATCH 1/2] Add --config-ref flag. --- .../deploy/webapp/request_webapp_deployment.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stack_orchestrator/deploy/webapp/request_webapp_deployment.py b/stack_orchestrator/deploy/webapp/request_webapp_deployment.py index 3ad1cb49..85ec4520 100644 --- a/stack_orchestrator/deploy/webapp/request_webapp_deployment.py +++ b/stack_orchestrator/deploy/webapp/request_webapp_deployment.py @@ -49,6 +49,7 @@ def fatal(msg: str): required=True, ) @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( "--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.", @@ -69,6 +70,7 @@ def command( app, deployer, env_file, + config_ref, make_payment, use_payment, dns, @@ -86,7 +88,8 @@ def command( if not deployer_record: fatal(f"Unable to locate deployer: {deployer}") - config_ref = None + if env_file and config_ref: + fatal(f"Cannot use --env-file and --config-ref at the same time.") # If env_file if env_file: @@ -132,9 +135,7 @@ def command( "version": "1.0.0", "name": f"{app_record.attributes.name}@{app_record.attributes.version}", "deployer": deployer, - "meta": { - "when": str(datetime.utcnow()) - } + "meta": {"when": str(datetime.utcnow())}, } } -- 2.45.2 From 434dc07bd717d9c873e5e8e70842abea34ebff64 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Tue, 27 Aug 2024 17:34:59 -0500 Subject: [PATCH 2/2] No 'f' --- stack_orchestrator/deploy/webapp/request_webapp_deployment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack_orchestrator/deploy/webapp/request_webapp_deployment.py b/stack_orchestrator/deploy/webapp/request_webapp_deployment.py index 85ec4520..70884f9d 100644 --- a/stack_orchestrator/deploy/webapp/request_webapp_deployment.py +++ b/stack_orchestrator/deploy/webapp/request_webapp_deployment.py @@ -89,7 +89,7 @@ def command( fatal(f"Unable to locate deployer: {deployer}") if env_file and config_ref: - fatal(f"Cannot use --env-file and --config-ref at the same time.") + fatal("Cannot use --env-file and --config-ref at the same time.") # If env_file if env_file: -- 2.45.2