feat: add update-kustomize-tag Woodpecker step #124
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/westside-app!124
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "123-update-kustomize-tag"
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?
Summary
update-kustomize-tagstep to the Woodpecker pipeline so that after a successful build-and-push on main, the image tag inpal-e-deployments/overlays/westsidekingsandqueens/prodis automatically bumpedChanges
.woodpecker.yaml: Addedupdate-kustomize-tagstep afterbuild-and-push, using the canonical script frompal-e-platform/scripts/update-kustomize-tag.shvia internal service URL. Usesforgejo_tokensecret,OVERLAY=westsidekingsandqueens, triggers only on push to main.Test Plan
forgejo_tokensecret exists in Woodpecker for this repo (confirmed: scoped topushevents)pal-e-deploymentsupdating the westsidekingsandqueens overlay tagReview Checklist
Related Notes
forgejo_admin/westside-app #123-- the Forgejo issue this PR implements (Closes #123)westside-app-- the project this work belongs topal-e-platform/scripts/woodpecker-update-tag-step.yamlpal-e-platform/scripts/update-kustomize-tag.shQA Review
Diff Analysis (1 file, +17 lines)
The new
update-kustomize-tagstep in.woodpecker.yamlis reviewed against the canonical template atpal-e-platform/scripts/woodpecker-update-tag-step.yamland the script atpal-e-platform/scripts/update-kustomize-tag.sh.Checklist
westsidekingsandqueensmatches the template mapping comment and the existingrepo: westsidekingsandqueens/appin the build stepFORGEJO_TOKEN(from secret),OVERLAY,IMAGE_TAG(fromCI_COMMIT_SHA)forgejo_tokenconfirmed in Woodpecker repo secrets, scoped topusheventsforgejo-http.forgejo.svc.cluster.local:80(cluster-internal), consistent with the clone step and the script's defaultFORGEJO_HOSTbuild-and-push, will not run unless build succeedsevent: push, branch: mainensures this only runs on main merges, not PRs or manual triggers (intentional: manual builds should not auto-deploy)from_secret, no tokens or credentials exposedNotes
VERDICT: APPROVE
PR #124 Review
DOMAIN REVIEW
Domain: Woodpecker CI / k8s CD pipeline (YAML)
This PR adds a single Woodpecker step (
update-kustomize-tag) to.woodpecker.yaml. The step downloads and executes the canonicalupdate-kustomize-tag.shscript frompal-e-platform, which handles the clone-sed-commit-push cycle with retry logic.Template conformance: The step is a near-exact copy of the canonical template at
pal-e-platform/scripts/woodpecker-update-tag-step.yaml. All structural elements match: image (alpine/git:latest), environment variables (FORGEJO_TOKENfrom secret,OVERLAY,IMAGE_TAG), commands (wget + sh),depends_on: build-and-push, and thewhenclause (event: push,branch: main).Cross-repo consistency: Compared against the same step already shipped in
pal-e-docs/.woodpecker.yamlandpal-e-app/.woodpecker.yaml-- the structure is identical, differing only in theOVERLAYvalue (westsidekingsandqueenshere, which matches the overlay mapping in the template comments).Target overlay verified:
pal-e-deployments/overlays/westsidekingsandqueens/prod/kustomization.yamlexists and contains anewTagfield at the expected two-space indent, which the script's sed pattern will match correctly.Secret handling:
forgejo_tokenis referenced viafrom_secret, not hardcoded. No plaintext credentials anywhere in the diff.Script safety: The canonical script at
pal-e-platform/scripts/update-kustomize-tag.shusesset -eu, validates all three required env vars, handles idempotent no-op (tag already up to date), and retries push up to 3 times with rebase for concurrent pipeline conflicts.BLOCKERS
None.
NITS
manualevent missing fromwhenclause: Thebuild-and-pushstep triggers onevent: [push, manual], butupdate-kustomize-tagtriggers onevent: pushonly. This matches the canonical template, so it is consistent. However, a manual rebuild on main would push a new image to Harbor but would NOT update the kustomize tag, leaving the deployment out of sync. Consider addingmanualto close that gap. (Non-blocking because it matches the template -- if this is intentional, it should be documented in the template itself.)Stale PR #113: PR #113 (
feat: auto-update kustomize image tag after build (#204)) is an older attempt at the same functionality that inlines all logic (no shared script, no retry, different secret nameci_forgejo_token, hardcoded push URL). It should be closed now that PR #124 supersedes it with the canonical pattern.SOP COMPLIANCE
123-update-kustomize-tagreferences issue #123)Closes #123)Missing from Related: no plan slug referenced. This appears to be standalone board work (not tied to a multi-phase plan), which is acceptable per kanban flow.
PROCESS OBSERVATIONS
mainwill auto-update the kustomize overlay and trigger ArgoCD sync, eliminating manual image tag bumps. Directly improves deployment frequency.[skip ci]commit messages to prevent infinite pipeline loops. The pattern is already proven inpal-e-docsandpal-e-app.VERDICT: APPROVED