Skip to content

Commit 64ab66f

Browse files
add makefile for helm chart
1 parent 20eaa4f commit 64ab66f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

chart/docker-auth/Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
CHART_NAME := docker-auth
2+
CHART_VERSION := $(shell grep '^version:' Chart.yaml | cut -d' ' -f2)
3+
PACKAGE_NAME := $(CHART_NAME)-$(CHART_VERSION).tgz
4+
5+
# Repository settings
6+
REPO_URL := https://cesanta.github.io/docker_auth/
7+
DOCS_DIR := ../../docs
8+
9+
.PHONY: lint
10+
lint:
11+
helm lint .
12+
13+
.PHONY: test
14+
test:
15+
helm template test-release . --dry-run > /dev/null
16+
17+
.PHONY: validate
18+
validate: lint test ## Run all validation checks
19+
@echo "All validations passed"
20+
21+
.PHONY: package
22+
package: validate ## Package the helm chart
23+
helm package .
24+
25+
.PHONY: update-repo
26+
update-repo: package
27+
mv $(PACKAGE_NAME) $(DOCS_DIR)/
28+
helm repo index $(DOCS_DIR)/ --url $(REPO_URL)
29+
@echo "Repository updated"
30+
@echo ""
31+
@echo "Please review changes, then commit and push the changes to GitHub."
32+
33+
.PHONY: debug
34+
debug:
35+
helm template debug-$(CHART_NAME) . --debug

0 commit comments

Comments
 (0)