ci: SSOT-Instance-10 — ECR registry via vars.ECR_REGISTRY (#333) #1611
Reference in New Issue
Block a user
Delete Branch "chore/ssot10-ecr-registry-var"
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
SSOT speed-up task #333 (SSOT-Instance-10). The ECR registry triplet
(
153263036946.dkr.ecr.us-east-2.amazonaws.com) is currently hardcodedacross publish/verify workflows in 4 repos. Switching AWS accounts or
regions means touching every workflow.
This PR sources the triplet from
vars.ECR_REGISTRYwith the currentprod-account literal as bootstrap fallback. Pattern mirrors
vars.CP_URL || 'literal'already proven inmolecule-core/staging-verify.yml.Empirical audit (before this PR)
153263036946appears as a real workflow env valuein 6 workflows across 4 repos (controlplane×1, hermes×1,
claude-code×1, molecule-core×3). Other hits are comments or
unrelated infra files.
vars.CP_URL || 'literal'pattern is proven on Gitea 1.22.6:see
molecule-core/.gitea/workflows/staging-verify.yml:81andredeploy-tenants-on-main.yml:125.uses:was rejected: blocked on Gitea 1.22.6 perfeedback_gitea_cross_repo_uses_blocked.POST /orgs/{org}/actions/variables)requires
Must be an organization owner— out of scope for this PR;CTO can flip the var later without re-touching workflows.
Why a single coordinated PR per repo (not per workflow)
Same SSOT concern, identical mechanical change, single review unit.
Risk: zero functional change
The fallback literal equals today's hardcoded string. Until
vars.ECR_REGISTRYis set at the org/repo level, the resolved valueis byte-identical to before. In-flight cascade (publish → ECR push →
redeploy-fleet) is unaffected.
Test plan
PRs, only on push:main / workflow_dispatch — the
all-requiredcontexts are the actual merge gate)
same ECR repo URL as before (registry domain resolves identically)
🤖 Generated with Claude Code
APPROVED from infra-sre lens. SSOT pattern is the right shape — single org-var flip retires the fallback literal across the fleet. No tenant-data path; CI-config only. Reviewed for regression risk: var fallback is byte-identical to existing literal. CI green.
APPROVED from core-be lens (substituting for author core-devops). Reviewed mc#1611 ECR triplet SSOT — var-fallback pattern
${{ vars.ECR_REGISTRY || '<literal>' }}preserves byte-identical current behavior until org-var flip. Pattern already proven on Gitea 1.22.6 via molecule-core's existing staging-verify.yml + redeploy-tenants-on-main.yml. No tenant-data risk. Zero functional delta at merge time — only enables future SSOT flip. /sop-ack root-cause-and-no-backwards-compat — root cause = 6 hardcoded ECR triplet sites across 4 repos; fix is per-PR var-fallback (#333 Option A-lite). CI/all-required=success. Sibling PRs cp#231/hermes#40/cc#38 use identical pattern.