clean up logging
All checks were successful
Deploy Containers / Prepare (push) Successful in 5s

This commit is contained in:
2025-11-21 03:33:05 -05:00
parent f6b850574d
commit f5a2b4c6c8

View File

@@ -21,9 +21,9 @@ def deploy(tag = None, host = None):
command = construct_command(tag, host)
if tag:
print(f"Deploying {tag}...\n")
print(f"[MAIN] Deploying {tag}...")
else:
print(f"Deploying {host}...\n")
print(f"[MAIN] Deploying host {host}...")
res = subprocess.run(command, shell=True, stdout=subprocess.DEVNULL)
return res.returncode == 0
@@ -75,6 +75,8 @@ def main():
deployed = []
failed = []
print("\n")
for task in new_diff:
deployment = deploy(tag=task)
@@ -82,7 +84,9 @@ def main():
failed.append(task)
else:
deployed.append(task)
print("\n")
print("\n")
for task in removed_containers:
print(f"[MAIN] Attempting to remove containers related to '{task}'...")
task_name = task.split("/")[1].split(".")[0]
@@ -98,6 +102,7 @@ def main():
subprocess.run(f"/usr/bin/docker container rm {docker_container_id}", shell=True, stdout=subprocess.DEVNULL)
subprocess.run("/usr/bin/docker image prune -f", shell=True, stdout=subprocess.DEVNULL)
subprocess.run("/usr/bin/docker container prune -f", shell=True, stdout=subprocess.DEVNULL)
print("\n")
if len(failed) <= 0 and len(deployed) > 0:
print("\n---------------------")