-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
14 lines (14 loc) · 882 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
help:
@echo " Available make commands "
@echo "---------------------------"
@echo "up Build Jenkins"
@echo "down Destroy Jenkins"
up:
docker build -t jenkins:terraform .
docker volume create jenkins_volume
docker run -v $(shell pwd):/home -v /var/run/docker.sock:/var/run/docker.sock -w /home hashicorp/terraform:light init
docker run -v $(shell pwd):/home -v /var/run/docker.sock:/var/run/docker.sock -w /home hashicorp/terraform:light validate
docker run -v $(shell pwd):/home -v /var/run/docker.sock:/var/run/docker.sock -w /home hashicorp/terraform:light plan -out=tfplan
docker run -v $(shell pwd):/home -v /var/run/docker.sock:/var/run/docker.sock -w /home hashicorp/terraform:light apply --auto-approve tfplan
down:
docker run -v $(shell pwd):/home -v /var/run/docker.sock:/var/run/docker.sock -w /home hashicorp/terraform:light destroy --auto-approve