mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-02 02:43:21 +00:00
fix(cd): keep SHA-tagged API images for rollback
This commit is contained in:
parent
15e80d56c0
commit
f0a200f6e9
2 changed files with 7 additions and 4 deletions
|
|
@ -32,6 +32,8 @@ def test_no_hcp_iam_and_no_prod():
|
|||
assert "ignore_changes = [task_definition, desired_count]" in ecs
|
||||
assert 'path = "/api/health"' in ecs
|
||||
assert "public.ecr.aws/docker/library/node:24-alpine" in ecs
|
||||
assert 'tagStatus = "untagged"' in ecs
|
||||
assert 'tagStatus = "any"' not in ecs
|
||||
cloudfront = (tf_dir / "cloudfront.tf").read_text()
|
||||
assert "cloudfront_default_certificate = true" in cloudfront
|
||||
assert "aliases" not in cloudfront
|
||||
|
|
|
|||
|
|
@ -19,11 +19,12 @@ resource "aws_ecr_lifecycle_policy" "api" {
|
|||
rules = [
|
||||
{
|
||||
rulePriority = 1
|
||||
description = "Keep the last 20 images"
|
||||
description = "Expire untagged images. SHA tags stay so registered task revisions can roll back."
|
||||
selection = {
|
||||
tagStatus = "any"
|
||||
countType = "imageCountMoreThan"
|
||||
countNumber = 20
|
||||
tagStatus = "untagged"
|
||||
countType = "sinceImagePushed"
|
||||
countUnit = "days"
|
||||
countNumber = 14
|
||||
}
|
||||
action = {
|
||||
type = "expire"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue