-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
58 lines (53 loc) · 1.37 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
# Load .env files
include .envrc
# Constants
levant = hashicorp/levant:0.3.0
help:##............Show this help
@echo ""
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | sed 's/^/ /'
@echo ""
.PHONY: deploy-%
deploy-%:##........Deploy specific job from sub folder
docker run \
--rm \
-e NOMAD_ADDR \
-e NOMAD_CACERT \
-e NOMAD_CLIENT_CERT \
-e NOMAD_CLIENT_KEY \
-e NOMAD_TOKEN \
-e NOMAD_REGION \
-e VAULT_TOKEN \
-e ENVIRONMENT \
-v ${PWD}/:/workdir \
-w /workdir \
$(levant) levant deploy -vault -var-file=/workdir/levant.yaml /workdir/recipes/$*/nomad.job
.PHONY: plan-%
plan-%:##..........Plan specific job from sub folder
docker run \
--rm \
-e NOMAD_ADDR \
-e NOMAD_CACERT \
-e NOMAD_CLIENT_CERT \
-e NOMAD_CLIENT_KEY \
-e NOMAD_TOKEN \
-e NOMAD_REGION \
-e VAULT_TOKEN \
-e ENVIRONMENT \
-v ${PWD}/:/workdir \
-w /workdir \
$(levant) levant plan -var-file=/workdir/levant.yaml /workdir/recipes/$*/nomad.job
.PHONY: render-%
render-%:##........Render specific job from sub folder
docker run \
--rm \
-e NOMAD_ADDR \
-e NOMAD_CACERT \
-e NOMAD_CLIENT_CERT \
-e NOMAD_CLIENT_KEY \
-e NOMAD_TOKEN \
-e NOMAD_REGION \
-e VAULT_TOKEN \
-e ENVIRONMENT \
-v ${PWD}/:/workdir \
-w /workdir \
$(levant) levant render -var-file=/workdir/levant.yaml /workdir/recipes/$*/nomad.job