-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (31 loc) · 1.02 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
SHELL := /bin/bash
# Dirpaths for images
POSTGRES_DIR := packer/postgres
######################
# Make Targets
######################
.PHONY: help
help: ## Show this help message.
@grep -E '^[a-zA-Z_/-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sort \
| awk 'BEGIN {FS = ":.*?## "; printf "\nUsage:\n"}; {printf " %-15s %s\n", $$1, $$2}'
@echo
######################
# Packer Targets
######################
# Postgres
.PHONY: publish-postgres
publish-postgres: ## Build and Publish the Nutanix Image.
@cd $(POSTGRES_DIR) && packer init .
@cd $(POSTGRES_DIR) && packer build .
.PHONY: build-postgres
build-postgres: ## Build the Nutanix Image.
@cd $(POSTGRES_DIR) && packer init .
@cd $(POSTGRES_DIR) && packer build -var "image_delete=true" .
.PHONY: fmt-postgres
fmt-postgres: ## Run packer fmt for the Nutanix Image.
@cd $(POSTGRES_DIR) && packer fmt .
.PHONY: validate-postgres
validate-postgres: ## Run packer validation for the Nutanix Image.
@cd $(POSTGRES_DIR) && packer init .
@cd $(POSTGRES_DIR) && packer validate .