-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 1.33 KB
/
Makefile
File metadata and controls
37 lines (27 loc) · 1.33 KB
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
export DEBUG=1
SHELL := /bin/bash
usage: ## Show this help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
install: ## Install dependencies
@which localstack || pip install localstack
@which awslocal || pip install awscli-local
run: ## Run MWAA ETL Processor
./run.sh
start: ## Start LocalStack
@echo "Attempting to create localstack network (if it doesn't already exist):"
@docker network create --attachable localstack || true
@echo "Starting LocalStack:"
EXTRA_CORS_ALLOWED_ORIGINS='*' DOCKER_FLAGS='-e LS_LOG=trace --network localstack --name=localhost.localstack.cloud -e GATEWAY_SERVER=hypercorn' localstack start -d
stop: ## Stop LocalStack
@echo
MAIN_CONTAINER_NAME=localhost.localstack.cloud localstack stop
docker rm -f $$(docker network inspect localstack | jq -r '.[0].Containers | keys[0]')
ready: ## Wait for LocalStack to be ready
@echo Waiting on the LocalStack container...
@localstack wait -t 30 && echo Localstack is ready to use! || (echo Gave up waiting on LocalStack, exiting. && exit 1)
logs: ## Retrieve logs from LocalStack
@localstack logs > logs.txt
test-ci: ## Run CI test
make start install ready run; return_code=`echo $$?`;\
make logs; make stop; exit $$return_code;
.PHONY: usage install start run stop ready logs test-ci