File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 8787 run : |
8888 IMG=ghcr.io/openmcp-project/metrics-operator:${{ env.version }} make docker-buildx docker-push
8989
90+ - name : Package and push helm chart
91+ run : |
92+ make helm-package helm-push
93+
9094 - name : setup OCM
9195 uses : open-component-model/ocm-setup-action@main
9296
Original file line number Diff line number Diff line change @@ -145,8 +145,7 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
145145ENVTEST ?= $(LOCALBIN ) /setup-envtest
146146GOTESTSUM ?= $(LOCALBIN ) /gotestsum
147147GOLANGCILINT ?= $(LOCALBIN ) /golangci-lint
148-
149-
148+ HELM ?= $(LOCALBIN ) /helm
150149
151150# # Tool Versions
152151KUSTOMIZE_VERSION ?= v5.4.1
@@ -255,6 +254,29 @@ docker-buildx: ## Build and tag docker image for each platform locally using --l
255254 $(CONTAINER_TOOL ) buildx rm project-v3-builder
256255 rm Dockerfile.cross
257256
257+ # ----------------------------------------------------------------------------------------------
258+ # #@ Helm
259+ HELM_VERSION ?= v3.18.0
260+ OCI_REGISTRY ?= ghcr.io/sap/charts
261+
262+ $(HELM ) : $(LOCALBIN )
263+ @if test -x $(LOCALBIN ) /helm && ! $(LOCALBIN ) /helm version --short | grep -q $(HELM_VERSION ) ; then \
264+ echo " $( LOCALBIN) /helm version is not expected $( HELM_VERSION) . Removing it before installing." ; \
265+ rm -rf $(LOCALBIN ) /helm; \
266+ fi
267+ test -s $(LOCALBIN ) /helm || (curl -sSL https://get.helm.sh/helm-$( HELM_VERSION) -$( shell uname | tr ' [:upper:]' ' [:lower:]' ) -amd64.tar.gz | tar xz -C /tmp && \
268+ mv /tmp/$(shell uname | tr '[:upper:]' '[:lower:]') -amd64/helm $(LOCALBIN ) /helm && \
269+ chmod +x $(LOCALBIN ) /helm && \
270+ rm -rf /tmp/$(shell uname | tr '[:upper:]' '[:lower:]') -amd64)
271+
272+ .PHONY : helm-package
273+ helm-package : $(HELM ) helm-chart
274+ $(LOCALBIN ) /helm package charts/$(PROJECT_FULL_NAME ) / -d ./ --version $(shell cat VERSION)
275+
276+ .PHONY : helm-push
277+ helm-push : $(HELM )
278+ $(LOCALBIN ) /helm push $(PROJECT_FULL_NAME ) -$(shell cat VERSION) .tgz oci://$(OCI_REGISTRY )
279+
258280# ----------------------------------------------------------------------------------------------
259281# #@ Deployment
260282.PHONY : install
You can’t perform that action at this time.
0 commit comments