Deployment strategy¶
Status: Accepted — ADR-0007. Implementation tracked under Epic F #51.
Companion: Release strategy · Rollback · PROD runbook
Split of responsibility¶
| Layer | Role |
|---|---|
| GitHub Actions | Quality gates (lint, tests, guards). Optional manual deploy orchestration (workflow_dispatch). |
| AWS CodePipeline | Build/push images + deploy ECS (API / Frappe). |
| AWS Amplify | Build/deploy frontends (admin, customer apps). |
Rule: a git push alone must not deploy DEV or PROD (target state: disable triggerOnPush; start pipeline from Actions — F.1 #52).
Environments¶
| Env | Typical git ref | How it ships |
|---|---|---|
| Shared DEV | feature/TASK-* or develop |
Manual workflow → CodePipeline DEV + Amplify DEV; confirm overwrite required for shared DEV |
| PROD | release/x.y.z only |
Manual workflow with confirm_prod=deploy; Amplify promote/deploy same ref (F.3 #57) |
DEV deploy (optional)¶
Use when a feature needs shared DEV validation before merge to develop.
- Branch exists:
feature/TASK-{id}-… - CI green on the branch / PR.
- Run deploy workflow (
workflow_dispatch) targeting dev. - If another developer’s work is on shared DEV, set the explicit
confirm_overwrite_dev(or equivalent) — no silent stomps. - Validate; then PR →
develop.
PROD deploy¶
- Cut
release/x.y.zfromdevelop(release strategy). - Run deploy workflow targeting prod from that release ref only.
- Confirm prod explicitly (
confirm_prod=deploy). - Smoke-test; then PR release →
mainand tag.
Guards (target):
- Prod cannot start from
feature/* - Ref must match
release/*for prod - See F.4 #58
Image / artifact identity¶
Prefer immutable tags (F.2 #53):
sha-<git-sha>build-<github-run-number>(optional companion)
Never deploy an ambiguous latest to PROD.
CDK / env guardrails¶
Infra changes still follow ../CDK-ENV-GUARDRAILS-DEV-PROD.md.
Deploying app code and changing CDK stacks are separate decisions — do not
bundle accidental prod infra with a routine app release.