CI pipeline targeted apply — module-aware .woodpecker.yaml #198
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#198
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?
Type
Feature
Lineage
Sub-ticket of #197 (Terraform state splitting). Split out because the CI pipeline change is non-trivial — 328-line
.woodpecker.yamlwith kubeconfig setup, 15+ secrets, lock retry logic.Repo
forgejo_admin/pal-e-platformUser Story
As a platform operator
I want CI to detect which Terraform module changed and only apply that module
So that applies are fast, focused, and don't fail on unrelated provider connectivity
Context
After #197 modularizes
main.tfinto 9 modules, the CI apply step needs to detect which module changed and runtofu apply -target=module.Xinstead of a full apply. The current.woodpecker.yamlapply step is 328 lines with kubeconfig rendering, 15+ secret env vars, plan comment posting, and state lock detection/retry. Modifying this requires careful handling.File Targets
Files to modify:
.woodpecker.yaml— apply step: add path-based module detection, run targeted apply per changed moduleFiles NOT to touch:
terraform/modules/— already restructured by #197terraform/main.tf— already restructured by #197Acceptance Criteria
terraform/modules/X/directory changed in the committofu apply -target=module.Xfor each changed modulemain.tf,variables.tf,providers.tf)Test Expectations
terraform/modules/ci/— verify only module.ci is appliedterraform/main.tf— verify full apply runsConstraints
tofu planmust include-lock=falseChecklist
Related
project-pal-e-platformScope Review: NEEDS_REFINEMENT
Review note:
review-437-2026-03-27The ticket is well-structured and all file targets verified, but has a correctness gap that would lead an agent to build on a false assumption.
Issues to fix before
next_up:tofu apply -target=module.ciwill still refreshmodule.storage,module.forgejo, andmodule.databasebecausemodule.ciconsumes their outputs. Only leaf modules (monitoring, forgejo, keycloak) get true isolation. The ticket should acknowledge this limitation so the agent doesn't write incorrect fallback logic or make false claims.No decomposition needed -- single file target, fits in one agent pass.
Issue body updated per scope review corrections.