diff --git a/.tools/test/DEPLOYMENT.md b/.tools/test/DEPLOYMENT.md index 464fa7a8e14..bdc7c9f13c6 100644 --- a/.tools/test/DEPLOYMENT.md +++ b/.tools/test/DEPLOYMENT.md @@ -25,14 +25,15 @@ python -m venv .venv && source .venv/bin/activate && pip install -r requirements #### Command Syntax ```bash -python stacks/deploy.py --type +cd stacks ; python deploy.py ``` -Replace `` with one of the supported types: +Replace `` with one of the supported stacks: - `admin`: Deploys admin-specific resources. - `images`: Deploys image-related resources. - `plugin`: Deploys plugin-specific resources. + - To deploy only a specific language's plugin, pass `--language ` where language is an account in ./stacks/config/targets.yaml. #### Additional Notes diff --git a/.tools/test/stacks/deploy.py b/.tools/test/stacks/deploy.py index 51b91e2bbd1..cba855ce41e 100644 --- a/.tools/test/stacks/deploy.py +++ b/.tools/test/stacks/deploy.py @@ -98,8 +98,9 @@ def deploy_resources(account_id, account_name, dir, lang="typescript"): def main(): - parser = argparse.ArgumentParser(description="admin, images, or plugin flag.") + parser = argparse.ArgumentParser(description="admin, images, or plugin stack.") parser.add_argument("type", choices=["admin", "images", "plugin"]) + parser.add_argument("--language") args = parser.parse_args() accounts = None @@ -122,11 +123,16 @@ def main(): accounts = yaml.safe_load(file) except Exception as e: print(f"Failed to read config data: \n{e}") - + if accounts is None: raise ValueError(f"Could not load accounts for stack {args.type}") - for account_name, account_info in accounts.items(): + if args.language: + items = [(args.language, accounts[args.language])] + else: + items = accounts.items() + + for account_name, account_info in items: print( f"Reading from account {account_name} with ID {account_info['account_id']}" )