forked from aws-samples/sqs-fargate-ddb-cdk-go
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
36 lines (27 loc) · 776 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
32
33
34
35
36
.PHONY: install init build build_docker test deploy start-ls stop-ls
.EXPORT_ALL_VARIABLES:
GOPROXY = direct
NETWORK_NAME="localstack-shared-net"
install:
@which localstack || pip install localstack
@which awslocal || pip install awscli-local
init:
cd cdk;\
npm i
build_docker:
docker build -t go-fargate .
deploy: build_docker
cd cdk;\
cdklocal bootstrap;\
cdklocal deploy ---require-approval never
start-ls:
-docker network create $(NETWORK_NAME) 2> /dev/null;
LAMBDA_DOCKER_NETWORK=$(NETWORK_NAME) DOCKER_FLAGS="--network $(NETWORK_NAME)" DEBUG=1 localstack start -d
stop-ls:
localstack stop
run: start-ls init deploy
./run.sh
make stop-ls
test: install start-ls init deploy
./run.sh;./test.sh;exit_code=`echo $$?`;\
make stop-ls; exit $$exit_code