forked from owncloud/ocis-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (50 loc) · 2.46 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
59
60
61
62
63
64
65
66
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include .bingo/Variables.mk
endif
all: docs lint api clean
.PHONY: docs
docs: $(HELM_DOCS) $(GOMPLATE)
$(HELM_DOCS) --template-files=README.md.gotmpl --output-file=README.md
$(HELM_DOCS) --log-level debug --template-files=charts/ocis/docs/templates/values-desc-table.adoc.gotmpl --output-file=docs/values-desc-table.adoc
$(HELM_DOCS) --log-level debug --template-files=charts/ocis/docs/templates/kube-versions.adoc.gotmpl --output-file=docs/kube-versions.adoc
$(GOMPLATE) --file=charts/ocis/docs/templates/values.adoc.yaml.gotmpl --out=charts/ocis/docs/values.adoc.yaml
.PHONY: clean
clean:
@rm charts/ocis/ci/templated.yaml
.PHONY: lint
lint: $(KUBE_LINTER)
# TODO: use helm from bingo
helm lint charts/ocis
helm template --kube-version 1.27.0 charts/ocis -f 'charts/ocis/ci/values.yaml' > charts/ocis/ci/templated.yaml
$(KUBE_LINTER) lint charts/ocis/ci/templated.yaml
.PHONY: api
api: api-1.25.0 api-1.26.0
.PHONY: api-1.25.0
api-1.25.0: api-1.25.0-template api-1.25.0-kubeconform
.PHONY: api-1.25.0-template
api-1.25.0-template:
helm template --kube-version 1.25.0 charts/ocis -f 'charts/ocis/ci/values.yaml' > charts/ocis/ci/templated.yaml
.PHONY: api-1.25.0-kubeconform
api-1.25.0-kubeconform: $(KUBECONFORM)
$(KUBECONFORM) -kubernetes-version 1.25.0 -summary -strict charts/ocis/ci/templated.yaml
.PHONY: api-1.26.0
api-1.26.0: api-1.26.0-template api-1.26.0-kubeconform
.PHONY: api-1.26.0-template
api-1.26.0-template:
helm template --kube-version 1.26.0 charts/ocis -f 'charts/ocis/ci/values.yaml' > charts/ocis/ci/templated.yaml
.PHONY: api-1.26.0-kubeconform
api-1.26.0-kubeconform: $(KUBECONFORM)
$(KUBECONFORM) -kubernetes-version 1.26.0 -summary -strict charts/ocis/ci/templated.yaml
.PHONY: api-1.27.0-template
api-1.27.0-template:
helm template --kube-version 1.27.0 charts/ocis -f 'charts/ocis/ci/values.yaml' > charts/ocis/ci/templated.yaml
.PHONY: api-1.27.0-kubeconform
api-1.27.0-kubeconform: $(KUBECONFORM)
$(KUBECONFORM) -kubernetes-version 1.27.0 -summary -strict charts/ocis/ci/templated.yaml
.PHONY: tools-update
tools-update: $(BINGO)
$(BINGO) get github.com/bwplotka/bingo@latest
$(BINGO) get github.com/hairyhenderson/gomplate/v3/cmd/gomplate@latest
$(BINGO) get github.com/norwoodj/helm-docs/cmd/helm-docs@latest
$(BINGO) get golang.stackrox.io/kube-linter/cmd/kube-linter@latest
$(BINGO) get github.com/yannh/kubeconform/cmd/kubeconform@latest