mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-07-26 07:58:14 +00:00
fix: store Terraform state on shared mount for CI persistence
Terraform state was stored in the container's working directory (fresh checkout), so it was lost between CI jobs. The cleanup job couldn't destroy resources because it had no state. Now stores state at /opt/pve-integration/work/terraform.tfstate via -state flag on all terraform commands. This persists across the provision → test → cleanup job chain in GitHub Actions. Also: - Force cleanup now removes state from both local and shared paths - Added -reconfigure to terraform init (avoids backend mismatch errors) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -209,6 +209,8 @@ 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
|
||||
|
||||
# ── Clean up old container images from GHCR ──────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user