Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[helm] makefile target for ghcr.io hosting #514

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
CHARTS_DIR := ./helm-charts
RELEASE_REGISTRY?=ghcr.io/opea-project
GIT_VERSION=$(shell git describe --tags --always --match "v*")
RELEASE_VERSION?=$(GIT_VERSION)
CHART_VERSION?=$(shell echo $(GIT_VERSION) | sed 's/^v//')

.PHONY: test

Expand All @@ -10,3 +14,11 @@ test:

pre-commit:
@pre-commit run --all-files

.PHONY: helm-push
helm-push:
@for chart in $$(find $(CHARTS_DIR) -maxdepth 2 -type f -name "Chart.yaml" | cut -d "/" -f 3); do \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"-maxdepth 2" only cover the top level examples, we should also release the helm charts for components, which are in the helm-charts/common directory.
https://github.com/opea-project/GenAIInfra/tree/charts-release

helm dependency update $(CHARTS_DIR)/$${chart} > /dev/null; \
helm package $(CHARTS_DIR)/$${chart} --version $(CHART_VERSION) --app-version $(RELEASE_VERSION) --destination .charts ;\
helm push .charts/$${chart}-$(CHART_VERSION).tgz oci://$(RELEASE_REGISTRY)/charts ;\
done