Files

27 lines
996 B
Python

"""Explicitly non-promotable upstream smoke wrapper; it never runs setup."""
from __future__ import annotations
import json
import sys
from pathlib import Path
from stage_evidence import run_stage
def main(config_path: Path) -> int:
request = json.loads(Path("/run/request.json").read_text(encoding="utf-8"))
payload = request.get("request", {})
if payload.get("run_kind") != "quarantined_smoke":
raise ValueError("quarantined smoke wrapper requires run_kind=quarantined_smoke")
# Setup, if needed for this deliberately non-promotable smoke, is a separate
# operator operation. This container stays network-isolated either way.
run_stage("provenance", ["python", "/opt/jr-wakeword/record-image-provenance.py"])
run_stage("run", ["livekit-wakeword", "run", str(config_path)])
run_stage("finalize", ["python", "/opt/jr-wakeword/finalize-run.py", str(config_path)])
return 0
if __name__ == "__main__":
raise SystemExit(main(Path(sys.argv[1])))