-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
67 lines (56 loc) · 1.62 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
67
CHART_NAME ?= prow
CHART_VERSION ?= 0.0.0
CHART_DIST ?= $(CHART_NAME)/dist
KUBEVAL_OPTS ?= --strict --kubernetes-version 1.16.0 --ignore-missing-schemas
HELM_PLUGIN_PUSH_URL := https://github.com/chartmuseum/helm-push
HELM_PLUGIN_PUSH_VERSION := v0.8.1
HELM_REPO_URL := https://charts.ouzi.io
HELM_REPO_NAME := ouzi
.PHONY: push-init
push-init:
@helm plugin install $(HELM_PLUGIN_PUSH_URL) --version $(HELM_PLUGIN_PUSH_VERSION) || echo "Plugin already installed - nothing to do"
@helm repo add $(HELM_REPO_NAME) $(HELM_REPO_URL)
@helm repo update
.PHONY: clean
clean:
rm -rf $(CHART_NAME)/charts
# does not work without explicitly specifying the api version
# see: https://github.com/helm/helm/issues/6505
.PHONY: validate
validate:
helm template prow \
--namespace prow \
--debug \
-a apiregistration.k8s.io/v1beta1 \
-a cert-manager.io/v1alpha2 \
-a monitoring.coreos.com/v1 \
-a apiextensions.k8s.io/v1beta1 \
-a credstash.local/v1 \
./${CHART_NAME} | kubeval $(KUBEVAL_OPTS)
.PHONY: package
package: clean
@helm package \
--version=$(CHART_VERSION) \
--dependency-update \
--destination $(CHART_DIST) \
./$(CHART_NAME)
push: push-init
@helm push $(CHART_DIST)/$(CHART_NAME)-$(CHART_VERSION).tgz $(HELM_REPO_NAME)
.PHONY: lint
lint:
helm lint ./$(CHART_NAME)
.PHONY: semantic-release
semantic-release:
npm ci
npx semantic-release
.PHONY: semantic-release-dry-run
semantic-release-dry-run:
npm ci
npx semantic-release -d
.PHONY: install-npm-check-updates
install-npm-check-updates:
npm install npm-check-updates
.PHONY: update-npm-dependencies
update-npm-dependencies: install-npm-check-updates
ncu -u
npm install