From 70c6ef77bef58705a33cdd40d5ad99a131684092 Mon Sep 17 00:00:00 2001 From: Mohsin Zaidi <2236875+smrz2001@users.noreply.github.com> Date: Wed, 16 Aug 2023 12:23:31 -0400 Subject: [PATCH] fix(ci): use single ecr repo for component deploys --- cd/manager/aws/ecs.go | 11 +++++------ ci/plans/cas.cue | 8 ++++---- ci/plans/ceramic.cue | 8 ++++---- ci/plans/ipfs.cue | 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/cd/manager/aws/ecs.go b/cd/manager/aws/ecs.go index f1bc975..582d99b 100644 --- a/cd/manager/aws/ecs.go +++ b/cd/manager/aws/ecs.go @@ -152,7 +152,7 @@ func (e Ecs) GenerateEnvLayout(component manager.DeployComponent) (*manager.Layo if casSchedulerFound { layout.Clusters[casCluster].Tasks = &manager.TaskSet{Tasks: map[string]*manager.Task{ casCluster + "-" + manager.ServiceSuffix_CasWorker: { - Repo: manager.CeramicEnvPfx() + "-cas-runner", + Repo: "ceramic-prod-cas-runner", Temp: true, // Anchor workers do not stay up permanently }, }} @@ -182,7 +182,7 @@ func (e Ecs) componentTask(component manager.DeployComponent, cluster, service s return &manager.Task{}, true } else if strings.Contains(service, manager.ServiceSuffix_CasWorker) { // CASv1 return &manager.Task{ - Repo: manager.CeramicEnvPfx() + "-cas-runner", + Repo: "ceramic-prod-cas-runner", Temp: true, // Anchor workers do not stay up permanently }, true } @@ -201,14 +201,13 @@ func (e Ecs) componentTask(component manager.DeployComponent, cluster, service s } func (e Ecs) componentEcrRepo(component manager.DeployComponent) (string, error) { - envStr := string(e.env) switch component { case manager.DeployComponent_Ceramic: - return manager.CeramicEnvPfx(), nil + return "ceramic-prod", nil case manager.DeployComponent_Ipfs: - return "go-ipfs-" + envStr, nil + return "go-ipfs-prod", nil case manager.DeployComponent_Cas: - return manager.CeramicEnvPfx() + "-cas", nil + return "ceramic-prod-cas", nil case manager.DeployComponent_CasV5: return "app-cas-scheduler", nil default: diff --git a/ci/plans/cas.cue b/ci/plans/cas.cue index 8be3964..60d0bdb 100644 --- a/ci/plans/cas.cue +++ b/ci/plans/cas.cue @@ -173,7 +173,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "ceramic-qa-cas" + REPO: "ceramic-prod-cas" TAGS: _tags + _extraTags + ["qa"] } } @@ -183,7 +183,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "ceramic-qa-cas-runner" + REPO: "ceramic-prod-cas-runner" TAGS: _tags + _extraTags + ["qa"] } } @@ -195,7 +195,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "ceramic-\(EnvTag)-cas" + REPO: "ceramic-prod-cas" TAGS: _tags + _extraTags } } @@ -205,7 +205,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "ceramic-\(EnvTag)-cas-runner" + REPO: "ceramic-prod-cas-runner" TAGS: _tags + _extraTags } } diff --git a/ci/plans/ceramic.cue b/ci/plans/ceramic.cue index 83566c9..8cef53f 100644 --- a/ci/plans/ceramic.cue +++ b/ci/plans/ceramic.cue @@ -176,7 +176,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "ceramic-qa" + REPO: "ceramic-prod" TAGS: _tags + _extraTags + ["qa"] } } @@ -186,7 +186,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "composedb-qa" + REPO: "composedb-prod" TAGS: _tags + _extraTags + ["qa"] } } @@ -197,7 +197,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "ceramic-\(EnvTag)" + REPO: "ceramic-prod" TAGS: _tags + _extraTags } } @@ -207,7 +207,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "composedb-\(EnvTag)" + REPO: "composedb-prod" TAGS: _tags + _extraTags } } diff --git a/ci/plans/ipfs.cue b/ci/plans/ipfs.cue index 204a47a..024734b 100644 --- a/ci/plans/ipfs.cue +++ b/ci/plans/ipfs.cue @@ -73,7 +73,7 @@ dagger.#Plan & { AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID AWS_ECR_SECRET: client.commands.aws.stdout AWS_REGION: Region - REPO: "go-ipfs-\(EnvTag)" + REPO: "go-ipfs-prod" TAGS: _tags + _extraTags } }