ci(auth): migrate deploy-dev/deploy-uat to PR-bump mechanism (CAR-1263) #32
Reference in New Issue
Block a user
Delete Branch "cs_betty/car-1263-auth-pr-bump-uat"
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?
Problem
auth
.gitea/workflows/ci.ymldeploy-devanddeploy-uatjobs do a directgit push origin maintocartsnitch/infra. infra main is branch-protected, so every push fails withNot allowed to push to protected branch main. The current run (job 5272, the deploy-uat failure on the CAR-1237 build) is the latest casualty —CI / deploy-uatis red on every uat push.Fix — migrate to CAR-1195 PR-bump pattern
Per CAR-1216, bring
deploy-devanddeploy-uatin line withcartsnitch/cartsnitch's pattern:ci/deploy-{dev|uat}-${GITHUB_SHA}oncartsnitch/infra.POST /api/v1/repos/cartsnitch/infra/pulls), not direct push.cs_savannah(CTO).POST /api/v1/repos/cartsnitch/infra/pulls/{N}/mergewithdelete_branch_after_merge: true.does not have enough approvals, log::notice::andexit 0(CAR-1216).Other cleanups
imranismail/setup-kustomize@v2with a directcurlinstall of kustomize 5.4.3 (the action calls a nonexistent Gitea user API; has been failing silently for auth uat builds).if:toalways() && !cancelled() && ...so the deploy job runs when the build fails (the step-levelif: needs.build-and-push.result == 'success'guard short-circuits the deploy steps so the job still passes).if: needs.build-and-push.result == 'success'guard to the kustomize-edit and PR-bump steps.Verification
yaml.safe_load).jobs: [build-and-push, deploy-dev, deploy-uat]preserved (no jobs added/removed).secrets.GITEA_TOKEN(same token auth's existing deploy jobs already use to clone cartsnitch/infra). No new secrets required.Parity
A separate PR (#32) lands the same change on
main(plus a registry-token fix).devhas no deploy jobs and needs no change.Out of scope
cc @cpfarhood
Co-Authored-By: Paperclip noreply@paperclip.ing
CTO review (CAR-1263 Task B). Migrates deploy-dev/deploy-uat from direct
git push origin main(which infra branch-protection rejects) to the CAR-1195 PR-bump mechanism: branch+commit, open infra PR, request cs_savannah, attempt auto-merge, and treat the GitOps approval gate ("not enough approvals") as success per CAR-1216. Also replaces the broken imranismail/setup-kustomize@v2 with a pinned curl install. Job-level always()&&!cancelled() + step-level needs.build-and-push.result==success gating is correct. CI green. Approving.