-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
37 lines (26 loc) · 1.12 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
default: environments/dev/manifests validate
TMP_DIR := $(shell pwd)/tmp
BIN_DIR ?= $(TMP_DIR)/bin
export GOBIN ?= $(BIN_DIR)
include .bingo/Variables.mk
SHELL=/usr/bin/env bash -o pipefail
vendor: $(JB)
$(JB) install
$(BIN_DIR):
mkdir -p $(BIN_DIR)
JSONNET_SRC = $(shell find . -type f -not -path './*vendor/*' \( -name '*.libsonnet' -o -name '*.jsonnet' \))
.PHONY: fmt
fmt: $(JSONNETFMT) $(JSONNET_SRC)
$(JSONNETFMT) -n 2 --max-blank-lines 2 --string-style s --comment-style s -i $(JSONNET_SRC)
environments/dev/manifests: environments/dev/main.jsonnet vendor $(JSONNET_SRC) $(JSONNET) $(GOJSONTOYAML)
-make fmt
-rm -rf environments/dev/manifests
-mkdir -p environments/dev/manifests
$(JSONNET) -J vendor -J lib -m environments/dev/manifests environments/dev/main.jsonnet | xargs -I{} sh -c 'cat {} | $(GOJSONTOYAML) > {}.yaml' -- {}
find environments/dev/manifests -type f ! -name '*.yaml' -delete
validate: $(KUBEVAL) environments/dev/manifests
$(KUBEVAL) environments/dev/manifests/*
dev-deploy: environments/dev/manifests
kubectl apply -n promtail -f environments/dev/manifests
test-e2e: $(BIN_DIR) $(KIND)
@./e2e.sh