generated from dabble-of-devops-bioanalyze/terraform-example-module
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
35 lines (28 loc) · 1.24 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
SHELL := /bin/bash
# List of targets the `readme` target should call before generating the readme
export README_DEPS ?= docs/targets.md docs/terraform.md
-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)
## Lint terraform code
lint:
$(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate
download-readme:
wget https://raw.githubusercontent.com/dabble-of-devops-bioanalyze/biohub-info/master/docs/README.md.gotmpl -O ./README.md.gotmpl
docker-run:
$(MAKE) download-readme
docker run -it -v "$(shell pwd):/tmp/terraform-module" \
-e README_TEMPLATE_FILE=/tmp/terraform-module/README.md.gotmpl \
-w /tmp/terraform-module \
--entrypoint bash \
cloudposse/build-harness:slim-latest bash
custom-init:
docker run -it -v "$(shell pwd):/tmp/terraform-module" \
-e README_TEMPLATE_FILE=/tmp/terraform-module/README.md.gotmpl \
-w /tmp/terraform-module \
cloudposse/build-harness:slim-latest init
custom-readme:
$(MAKE) download-readme
$(MAKE) custom-init
docker run -it -v "$(shell pwd):/tmp/terraform-module" \
-e README_TEMPLATE_FILE=/tmp/terraform-module/README.md.gotmpl \
-w /tmp/terraform-module \
cloudposse/build-harness:slim-latest readme