Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .tools/test/stacks/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import os
import yaml
import time
import logging
import re


Expand All @@ -31,9 +30,12 @@ def run_shell_command(command, env_vars=None):
try:
output = subprocess.check_output(command, stderr=subprocess.STDOUT, env=env)
print(f"Command output: {output.decode()}")
except Exception as e:
except subprocess.CalledProcessError as e:
print(f"Error executing command: {e.output.decode()}")
raise
except Exception as e:
print(f"Exception executing command: {e!r}")
raise


def validate_alphanumeric(value, name):
Expand Down Expand Up @@ -100,6 +102,8 @@ def main():
parser.add_argument("type", choices=["admin", "images", "plugin"])
args = parser.parse_args()

accounts = None

if args.type in {"admin", "images"}:
try:
with open("config/resources.yaml", "r") as file:
Expand All @@ -119,6 +123,9 @@ def main():
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():
print(
f"Reading from account {account_name} with ID {account_info['account_id']}"
Expand Down
Loading