forked from villasv/aws-airflow-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (29 loc) · 893 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
37
38
prefix := quickstart-turbine-airflow
bucket := s3://turbine-quickstart
ifndef branch
branch := $(shell git rev-parse --abbrev-ref HEAD)
endif
ifneq ($(branch),master)
prefix := $(prefix)-$(branch)
endif
regions := $(shell yq -r '.Mappings.AWSAMIRegionMap | keys[]' \
templates/turbine-scheduler.template)
lint:
black . --check
flake8 .
pylint **/*.py
cfn-lint templates/*.template
nuke:
aws-nuke -c ci/awsnuke.yaml --force --quiet --no-dry-run
pack:
7z a ./functions/package.zip ./functions/*.py -stl
s3-%: pack
# aws s3 rm $(bucket)-$*/$(prefix) --recursive
aws s3 sync --exclude '.*' --acl public-read . $(bucket)-$*/$(prefix)
targets := $(addprefix s3-,$(regions))
sync: pack $(targets)
# aws s3 rm $(bucket)/$(prefix) --recursive
aws s3 sync --exclude '.*' --acl public-read . $(bucket)/$(prefix)
test: pack
pytest -vv
taskcat test run --input-file ./ci/taskcat.yaml