Phase 6.3: Plan-on-PR Pipeline

phase-pal-e-platform-ci-6-3-plan-on-pr Phase

Goal: PRs to pal-e-platform show tofu plan output as a Forgejo PR comment, so reviewers can see exactly what infrastructure changes a PR will make before merge.
Owner: Dev agent
Repo: forgejo_admin/pal-e-platform
Depends on: phase-pal-e-platform-ci-6-2-validation-pipeline (COMPLETED)

Scope

  • Add 17 Woodpecker repo secrets: KUBECONFIG_CONTENT, FORGEJO_TOKEN, 15 TF_VAR_* secrets
  • Update .woodpecker.yaml: add plan step that runs tofu plan -no-color on PR events
  • Plan step runs AFTER validate step (validate gates plan)
  • Post plan output as Forgejo PR comment via curl to Forgejo API
  • Use modified kubeconfig (server: 10.0.0.217:6443) for in-cluster access from CI pods

Deliverables

  • PR #50 merged (squash) — .woodpecker.yaml updated with plan step
  • 17 Woodpecker repo secrets created via API (repo ID 29)
  • Pipeline #9 verified: clone→validate→plan all green, plan output posted as 5,520-char PR comment
  • Forgejo Issue #48 closed

Bugs Fixed During Implementation

  • Woodpecker v3 removed secrets: step property — migrated to environment: ... from_secret:
  • Forgejo API uses issues/{N}/comments not pulls/{N}/comments for PR comments
  • Woodpecker API requires numeric repo ID (not full name) for secret creation
  • plan-pal-e-platform -- parent plan
  • phase-pal-e-platform-ci-6-4-apply-on-merge -- next phase (depends on this)