mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-29 14:30:52 +00:00
fix(ci): show deploy stdout/stderr and pass inventory_dir in run orchestrator
- Capture and print deploy stdout/stderr on failure (development/deploy.py) - Forward INVENTORY_DIR into init and deploy handlers (development/run.py) - Add missing when_down flag for up handler - Print full traceback on orchestrator failure for CI visibility https://chatgpt.com/share/6970fcf5-5860-800f-89ae-0d601405489b
This commit is contained in:
2 files changed
+30
-5
No files matched your search
@@ -38,11 +38,19 @@ def _run_deploy(
|
||||
if debug:
|
||||
cmd.insert(cmd.index("-T"), "--debug")
|
||||
|
||||
# Forward native ansible-playbook flags (via dedicated wrapper passthrough)
|
||||
if passthrough:
|
||||
cmd.extend(passthrough)
|
||||
|
||||
r = compose.exec(cmd, check=False)
|
||||
# IMPORTANT: capture output so we can show it on failure
|
||||
r = compose.exec(cmd, check=False, capture=True)
|
||||
|
||||
if r.returncode != 0:
|
||||
print("===== deploy stdout =====")
|
||||
print((r.stdout or "").rstrip() or "<empty>")
|
||||
print("===== deploy stderr =====")
|
||||
print((r.stderr or "").rstrip() or "<empty>")
|
||||
print("=========================")
|
||||
|
||||
return int(r.returncode)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user