Skip to content

Commit

Permalink
fix(ci): use single ecr repo for component deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Aug 16, 2023
1 parent 41e860b commit 70c6ef7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
11 changes: 5 additions & 6 deletions cd/manager/aws/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
}}
Expand Down Expand Up @@ -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
}
Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions ci/plans/cas.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}
Expand All @@ -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"]
}
}
Expand All @@ -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
}
}
Expand All @@ -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
}
}
Expand Down
8 changes: 4 additions & 4 deletions ci/plans/ceramic.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}
Expand All @@ -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"]
}
}
Expand All @@ -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
}
}
Expand All @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion ci/plans/ipfs.cue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 70c6ef7

Please sign in to comment.