-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
37 lines (26 loc) · 1.17 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
SHELL:=/bin/bash
include .env
EXAMPLE=$(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
VERSION=$(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
.PHONY: all clean validate test diagram docs format release
all: test docs format
clean:
rm -rf .terraform/ terraform.tfstate* examples/ical4j/build ical4j.zip opentracing.zip
validate:
$(TERRAFORM) init && $(TERRAFORM) validate
test: validate
$(CHECKOV) -d /work
$(TFSEC) /work
diagram:
$(DIAGRAMS) diagram.py
docs: diagram
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./ >./README.md && \
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/aws-sdk-java >./modules/aws-sdk-java/README.md && \
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/groovy-runtime >./modules/groovy-runtime/README.md && \
docker run --rm -v "${PWD}:/work" tmknom/terraform-docs markdown ./modules/python-requests >./modules/python-requests/README.md
format:
$(TERRAFORM) fmt -list=true -recursive
example:
$(TERRAFORM) -chdir=examples/$(EXAMPLE) init && $(TERRAFORM) -chdir=examples/$(EXAMPLE) plan -input=false
release: test
git tag $(VERSION) && git push --tags