forked from kubegems/plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (38 loc) · 1.13 KB
/
Makefile
File metadata and controls
46 lines (38 loc) · 1.13 KB
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
CHARTS_DIR?=plugins
HELM_REPO_USERNAME?=kubegems
HELM_REPO_PASSWORD?=
CHARTMUSEUM_ADDR?=https://${HELM_REPO_USERNAME}:${HELM_REPO_PASSWORD}@charts.kubegems.io/kubegems
all: package check push
local: package check
generate: helm-schema
find ${CHARTS_DIR} -mindepth 1 -maxdepth 1 -type d -not -name 'common' | xargs -n1 \
helm-schema {}
TEMP_CHARTS_DIR := tmp
package:
find ${CHARTS_DIR} -mindepth 1 -maxdepth 1 -type d | xargs -n1 \
helm package -u -d ${TEMP_CHARTS_DIR}
check:
find ${TEMP_CHARTS_DIR}/*.tgz -not -name 'common*' | xargs -n1 \
helm template -g 1>/dev/null
.PHONY: helm-push
push:
find ${TEMP_CHARTS_DIR}/*.tgz | xargs -I {} \
curl --data-binary @{} ${CHARTMUSEUM_ADDR}/api/charts
.PHONY: readme-generator
readme-generator:
ifeq (, $(shell which readme-generator))
@{ \
set -e ;\
echo 'installing readme-generator-for-helm' ;\
npm install -g readme-generator-for-helm ;\
}
else
echo 'readme-generator-for-helm is already installed'
endif
.PHONY: helm-schema
helm-schema:
ifeq (, $(shell which helm-schema))
go install kubegems.io/kubegems/tools/helm-schema@latest
else
echo 'helm-schema is already installed'
endif