-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·75 lines (54 loc) · 2.03 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.PHONY: info setup setup-* install install-* build build-* clean clean-* sam-* setup/*
DOCKER_COMPOSE ?= docker-compose
DOCKER_COMPOSE_FILE := ./build/ci/codebuild/docker-compose.yml
DOCKER_COMPOSE_SAM_FILE := ./build/ci/codebuild/docker-compose.sam.yml
DOCKER_COMPOSE_LOAD_DATA_FILE := ./build/ci/codebuild/docker-compose.load-data.yml
DOCKER_COMPOSE_TEST_FILE := ./build/ci/codebuild/docker-compose.tests.yml
DOCKER_COMPOSE_CMD := $(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) -f $(DOCKER_COMPOSE_SAM_FILE)
DOCKER_COMPOSE_LOAD_CMD := $(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) -f $(DOCKER_COMPOSE_LOAD_DATA_FILE)
DOCKER_COMPOSE_TEST_CMD := $(DOCKER_COMPOSE_CMD) -f $(DOCKER_COMPOSE_TEST_FILE)
ifeq ($(DETACH_ENABLED), true)
DETACH := --detach
endif
load-data:
@$(MAKE) --directory=tools/dataloader load-data
info:
@(printenv | sort -if)
@(go version)
clean-golang:
@$(MAKE) -C lambdas/golang clean
build-golang:
@$(MAKE) -C lambdas/golang build
clean-java8:
@$(MAKE) -C lambdas/java8 clean
build-java8:
@$(MAKE) -C lambdas/java8 fix-gradlew
@$(MAKE) -C lambdas/java8 build
sam-lint:
@(cfn-lint api/aws-sam/template.yaml)
docker-compose-env:
@(echo "DOCKER_VOLUME_BASEDIR=$(CURDIR)" > .env)
@(echo "LOCAL_M2=$(LOCAL_M2)" >> .env)
sam-start: docker-compose-env
@$(DOCKER_COMPOSE_CMD) up $(DETACH)
sam-stop: docker-compose-env
@$(DOCKER_COMPOSE_CMD) stop
sam-create-table: docker-compose-env
@$(DOCKER_COMPOSE_LOAD_CMD) run create-table
sam-data-load: docker-compose-env
@$(DOCKER_COMPOSE_LOAD_CMD) run data-load
sam-test-clean:
@rm -rf test/bdd/target
@echo "All clean"
@mkdir -p test/bdd/target
sam-test-aggregate: docker-compose-env sam-test-clean
@$(DOCKER_COMPOSE_TEST_CMD) run sam-test-aggregate
sam-test: docker-compose-env sam-test-clean
@$(DOCKER_COMPOSE_TEST_CMD) run sam-test
sam-pull:
@$(MAKE) -C build/ci/docker
setup/python/venv:
@(test -d venv || python3 -m venv venv)
@(./venv/bin/pip install --upgrade --requirement ./build/ci/codebuild/requirements.txt)
setup/python: setup/python/venv
@(./venv/bin/python --version)