forked from assertible/lambda-cloudwatch-slack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (29 loc) · 1.12 KB
/
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
32
33
34
35
LAMBDA_TEST?=./node_modules/node-lambda/bin/node-lambda
LAMBDA_FUNCTION_NAME=
AWS_REGION=
AWS_ROLE=
AWS_PROFILE=
all:
npm build
.PHONY: deps
deps:
npm install
.PHONY: test
test:
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) run -x test/context.json -j test/sns-cloudwatch-event.json
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) run -x test/context.json -j test/sns-elastic-beanstalk-event.json
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) run -x test/context.json -j test/sns-codedeploy-event.json
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) run -x test/context.json -j test/sns-codedeploy-configuration.json
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) run -x test/context.json -j test/sns-elasticache-event.json
AWS_REGION=$(AWS_REGION) $(LAMBDA_TEST) run -x test/context.json -j test/sns-autoscaling-event.json
.PHONY: package
package:
$(LAMBDA_TEST) package --functionName $(LAMBDA_FUNCTION_NAME)
.PHONY: deploy
deploy:
$(LAMBDA_TEST) deploy --functionName $(LAMBDA_FUNCTION_NAME) \
--role $(AWS_ROLE) \
--accessKey $(AWS_ACCESS_KEY_ID) \
--secretKey $(AWS_ACCESS_KEY_SECRET) \
--region $(AWS_REGION) \
--profile $(AWS_PROFILE)