forked from codeforjapan/decidim-cfj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecr.yml
60 lines (59 loc) · 1.75 KB
/
ecr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
AWSTemplateFormatVersion: "2010-09-09"
Description: Create decidim-cfj ECR
Resources:
EcrRepo:
Type: AWS::ECR::Repository
Properties:
RepositoryName: decidim-cfj
ImageScanningConfiguration:
scanOnPush: "true"
ImageTagMutability: "MUTABLE"
LifecyclePolicy:
LifecyclePolicyText: |
{
"rules": [
{
"rulePriority": 1,
"description": "Delete image without tag after 7 days",
"selection": {
"tagStatus": "untagged",
"countType": "sinceImagePushed",
"countUnit": "days",
"countNumber": 7
},
"action": {
"type": "expire"
}
},
{
"action": {
"type": "expire"
},
"selection": {
"countType": "imageCountMoreThan",
"countNumber": 7,
"tagStatus": "tagged",
"tagPrefixList": [
"staging-"
]
},
"description": "stagingイメージの削除",
"rulePriority": 2
},
{
"action": {
"type": "expire"
},
"selection": {
"countType": "imageCountMoreThan",
"countNumber": 7,
"tagStatus": "tagged",
"tagPrefixList": [
"production-"
]
},
"description": "productionイメージの削除",
"rulePriority": 3
}
]
}