fix(ops): prune old docker artifacts after deploy

This commit is contained in:
Xiaoxia AI
2026-06-23 22:39:18 +08:00
parent 8b2f4b3a34
commit bf452e3510
4 changed files with 19 additions and 6 deletions
+8
View File
@@ -135,6 +135,14 @@ def test_deploy_scripts_build_web_image_explicitly():
assert "WORKER_CONCURRENCY: ${WORKER_CONCURRENCY:-1}" in compose
def test_production_deploy_prunes_old_unused_docker_artifacts():
script = Path("infra/docker/deploy-production.sh").read_text(encoding="utf-8")
assert "PRUNE_UNUSED_DOCKER_AFTER_DEPLOY" in script
assert "docker image prune -af --filter \"until=168h\"" in script
assert "docker builder prune -af --filter \"until=168h\"" in script
def test_worker_runtime_is_constrained_by_environment():
dockerfile = Path("infra/docker/worker.Dockerfile").read_text(encoding="utf-8")