Skip to content

Commit

Permalink
feat(ci): push images to single prod ecr repo
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Nov 8, 2023
1 parent e629207 commit 314764f
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions ci/plans/cd-manager.cue
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,19 @@ dagger.#Plan & {
}

push: [Region=aws.#Region]: [EnvTag=#EnvTag]: [Branch=#Branch]: [Sha=#Sha]: [ShaTag=#ShaTag]: {
_baseTags: ["\(EnvTag)", "\(Branch)", "\(Sha)", "\(ShaTag)"]
_tags: [...string]
{
Branch == "main"
_tags: _baseTags + ["latest"]
} | {
_tags: _baseTags
_tags: ["\(EnvTag)", "\(Branch)", "\(Sha)", "\(ShaTag)"]
_extraTags: [...string] | *[]
if EnvTag == "prod" {
_extraTags: ["latest"]
}
ecr: utils.#ECR & {
img: image.output
env: {
AWS_ACCOUNT_ID: client.env.AWS_ACCOUNT_ID
AWS_ECR_SECRET: client.commands.aws.stdout
AWS_REGION: Region
REPO: "ceramic-\(EnvTag)-ops-cd-manager"
TAGS: _tags
REPO: "ceramic-prod-ops-cd-manager"
TAGS: _tags + _extraTags
}
}
}
Expand Down

0 comments on commit 314764f

Please sign in to comment.