Phase 6.3: Plan-on-PR pipeline — tofu plan output as PR comment #48
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform#48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lineage
plan-pal-e-platform→ Phase 6 (CI Hardening) → Phase 6.3Repo
forgejo_admin/pal-e-platformUser Story
As an infrastructure reviewer
I want to see
tofu planoutput on every PRSo that I can review planned infrastructure changes before approving a merge
Context
Woodpecker CI is now activated for pal-e-platform (repo ID 29). Phase 6.2 deployed a validation pipeline (
.woodpecker.yamlwithtofu fmt -check+tofu validate). Phase 6.3 adds aplanstep that runs a fulltofu planand posts the output as a Forgejo PR comment.All 17 Woodpecker repo secrets have been pre-created by Betty Sue:
KUBECONFIG_CONTENT— modified kubeconfig withserver: https://10.0.0.217:6443for in-cluster API accessFORGEJO_TOKEN— API token withwrite:issuescope for posting PR commentsTF_VAR_*secrets matching every variable interraform/variables.tfKey architectural decisions:
10.0.0.217:6443(node IP) instead of127.0.0.1:6443(localhost) because CI pods have their own network namespacetofu init -backend-config="config_path=/tmp/kubeconfig"TF_VAR_kubeconfig_path=/tmp/kubeconfigcurlto Forgejo API (no plugin needed)ghcr.io/opentofu/opentofu:1.9image is Alpine-based — installcurlandjqviaapk addFile Targets
Files the agent should modify:
.woodpecker.yaml— addplanstep after existingvalidatestepFiles the agent should NOT touch:
terraform/*.tf— no Terraform changes in this PRMakefile— no changesAcceptance Criteria
tofu plan -no-colortofu planfails (exit code preserved)Test Expectations
.tfchange and verify plan comment appearsConstraints
ghcr.io/opentofu/opentofu:1.9image (same as validate step)depends_on: [validate])when: event: pull_requesttrigger for validate; plan uses same triggerjqfor safe JSON encoding of plan output (avoid shell escaping issues)Checklist
Related
phase-pal-e-platform-ci-6-3-plan-on-pr— phase noteplan-pal-e-platform— parent plan