Files
computer-playbook/cli/deploy/test/logs.py
T
kevinveenbirkenbach dba121ecf4 refactor(ci): move deploy test runner from bash to python orchestrator
* Add `cli.deploy.test` module to orchestrate compose-based CI deploy tests
* Support server per-app runs (including run_after dependencies) and workstation selection
* Add optional image build flags (--no-cache, --missing) and stack retention on failure
* Simplify `scripts/tests/deploy.sh` to a thin wrapper that forwards args to the Python runner

https://chatgpt.com/share/695f9e22-6e9c-800f-9a50-65f553619af2
2026-01-08 13:07:57 +01:00

21 lines
623 B
Python

from __future__ import annotations
from pathlib import Path
def log_path(logs_dir: Path, deploy_type: str, distro: str, suffix: str) -> Path:
return logs_dir / f"deploy-{deploy_type}-{distro}-{suffix}.log"
def write_text(path: Path, text: str) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(text, encoding="utf-8")
def append_text(path: Path, text: str) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
existing = ""
if path.exists():
existing = path.read_text(encoding="utf-8", errors="replace")
path.write_text(existing + text, encoding="utf-8")