fix: use force-cleanup in CI for reliable teardown

CI cleanup should always succeed regardless of Terraform state
(cancelled runs, timeouts, partial failures). force-cleanup uses
direct API calls + docker rm instead of terraform destroy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-25 17:06:22 -05:00
parent 226f9d8a12
commit e90fb760f6
+3 -3
View File
@@ -209,9 +209,9 @@ jobs:
PVE_API_TOKEN: ${{ secrets.PVE_API_TOKEN }}
PVE_TARGET_NODE: ${{ vars.PVE_TARGET_NODE }}
PVE_PASSWORD: ${{ secrets.PVE_TEST_PASSWORD }}
# Terraform state is stored on the shared mount (/opt/pve-integration/work/)
# so it persists between CI jobs.
run: bash ${SCRIPTS_DIR}/run-integration.sh cleanup
# Always use force-cleanup in CI — handles corrupted state from
# cancelled runs, timeouts, or partial provisioning failures.
run: bash ${SCRIPTS_DIR}/run-integration.sh force-cleanup
# ── Clean up old container images from GHCR ──────────────────────────
cleanup-images: