-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
31 lines (26 loc) · 861 Bytes
/
Makefile
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
TEMPLATE ?= dist/aws-ecr-public.template.json
STACK_NAME ?= aws-ecr-public
VALIDATION_DOMAIN ?= ""
DOMAIN_NAME ?= ""
VALIDATION_METHOD ?= "EMAIL"
VERSION = 1.2.0
build: serverless.template.yml api.openapi.yml lambda/*
mkdir -p dist
cfn-include -t -m serverless.template.yml > $(TEMPLATE)
test: build
aws cloudformation deploy \
--template-file $(TEMPLATE) \
--stack-name $(STACK_NAME) \
--capabilities CAPABILITY_IAM \
--parameter-overrides \
ValidationDomain=$(VALIDATION_DOMAIN) \
DomainName=$(DOMAIN_NAME) \
ValidationMethod=$(VALIDATION_METHOD) \
AuthBasicUsername=foo \
AuthBasicPassword=bar \
Authorizer=BASIC
publish: build
aws s3 cp --acl public-read dist/aws-ecr-public.template.json s3://monken/aws-ecr-public/v$(VERSION)/template.json
clean:
rm -rf dist
aws cloudformation delete-stack --stack-name $(STACK_NAME)