ci(ecr): auto-apply canonical image lifecycle policy on prod ECR push #19
Reference in New Issue
Block a user
Delete Branch "ops/ecr-lifecycle-iac"
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?
Auto-apply + maintain the canonical prod ECR image lifecycle policy from publish-image.yml (already runs with prod-ECR push creds), so the prod ECR storage bill (~$56/mo, acct 153263036946) stops growing. Adds a shared, idempotent, fail-soft scripts/ensure-ecr-lifecycle.sh (SSOT JSON in that one file, byte-identical to the molecule-core copy: expire untagged after 1 day; keep last 10 tagged for sha-/v/latest/staging/main) called after the image push. Only declares policy (no deletes; ECR's lifecycle engine does expiry). shellcheck clean, YAML parses, fail-soft verified.
🤖 Generated with Claude Code
Reviewed: additive post-push ensure-ecr-lifecycle step, fail-soft (never breaks publish), canonical policy SSOT, lints pass. Durable prod-ECR cost guard. LGTM.
Reviewed: additive post-push ensure-ecr-lifecycle step, fail-soft (never breaks publish), canonical policy SSOT, lints pass. Durable prod-ECR cost guard. LGTM.