-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (40 loc) · 1.64 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
# WARNING: You don't need to edit this file
SH := /bin/bash
.EXPORT_ALL_VARIABLES:
LOG_FILE := $(if $(LOG_FILE),$(LOG_FILE),$(shell mktemp))
# HELP
# This will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
.DEFAULT_GOAL := help
start-log:
@echo "Saving logfile to: $(LOG_FILE)"
end-log:
./scripts/parselog.sh
apply-cluster: ## Apply the cluster Terraform workspace
./scripts/apply.sh cluster
apply-deploy: ## Apply the app-deployment Terraform workspace
./scripts/apply.sh app-deployment
apply: apply-cluster apply-deploy ## Apply both Terraform workspaces, one after another
check-todos: ## Check all TODOs were addressed
./scripts/check-todos.sh
check-tools: ## Check all required tools are installed
./scripts/check-tools.sh
test: ## Check that the S3 app works correctly and the Terraform outputs are correct
./scripts/test.sh
destroy: ## Destroy both Terraform workspaces, one after another
./scripts/destroy.sh
localstack-start: ## Starts Localstack locally with all the correct configurations
./scripts/localstack.sh start
localstack-stop: ## Stops Localstack
./scripts/localstack.sh stop
full-test: ## Run the full testing suite
$(MAKE) start-log
$(MAKE) check-todos || ( $(MAKE) end-log ; exit 1 )
$(MAKE) check-tools || ( $(MAKE) end-log ; exit 1 )
$(MAKE) apply || ( $(MAKE) end-log ; exit 1 )
$(MAKE) test || ( $(MAKE) end-log ; exit 1 )
$(MAKE) destroy || ( $(MAKE) end-log ; exit 1 )
$(MAKE) end-log