@@ -41,44 +41,43 @@ package-and-update: add-helm-repositories
4141# Target to add Helm repositories
4242.PHONY : add-helm-repositories
4343add-helm-repositories :
44- set -e; \
4544 helm repo add cnpg https://cloudnative-pg.github.io/charts; \
4645 helm repo add minio https://operator.min.io/; \
4746 helm repo update
4847
4948# Target to lint Helm charts using chart-testing
5049.PHONY : lint
5150lint : add-helm-repositories
52- echo " Linting Helm charts..."
51+ echo " Linting Helm charts..." ; \
5352 if [ -f ./ct.yaml ]; then \
5453 ct lint --config ./ct.yaml --chart-dirs $(HELM_CHARTS_DIR ) --charts $(HELM_CHARTS_DIR ) /mlflow $(HELM_CHARTS_DIR ) /infra; \
5554 else \
5655 echo " Warning: ct.yaml not found. Using default configuration." ; \
5756 ct lint --chart-dirs $(HELM_CHARTS_DIR ) --charts $(HELM_CHARTS_DIR ) /mlflow $(HELM_CHARTS_DIR ) /infra; \
58- fi
57+ fi ; \
5958 echo " Linting completed successfully."
6059
6160# Target to template Helm charts (render templates without installing)
6261# Explicitly disables the Replicated SDK for testing non-SDK scenarios
6362.PHONY : template
6463template : add-helm-repositories
65- echo " Templating Helm charts with Replicated SDK disabled..."
66- mkdir -p ./rendered-templates
64+ echo " Templating Helm charts with Replicated SDK disabled..." ; \
65+ mkdir -p ./rendered-templates; \
6766 for chart in $( CHARTS) ; do \
6867 echo " Rendering templates for $$ chart..." ; \
6968 if [ " $$ chart" = " mlflow" ]; then \
7069 helm template $(HELM_CHARTS_DIR ) /$$ chart --output-dir ./rendered-templates/$$ chart --set replicated.enabled=false --debug; \
7170 else \
7271 helm template $(HELM_CHARTS_DIR ) /$$ chart --output-dir ./rendered-templates/$$ chart --debug; \
7372 fi \
74- done
73+ done ; \
7574 echo " Templates rendered in ./rendered-templates directory."
7675
7776# Target to run a full install test (requires a Kubernetes cluster)
7877.PHONY : test
7978test : lint template
80- echo " Running full chart installation test..."
81- echo " Note: This requires a connected Kubernetes cluster."
79+ echo " Running full chart installation test..." ; \
80+ echo " Note: This requires a connected Kubernetes cluster." ; \
8281 if [ -f ./ct.yaml ]; then \
8382 ct install --config ./ct.yaml --chart-dirs $(HELM_CHARTS_DIR ) \
8483 --charts $(HELM_CHARTS_DIR ) /infra && \
@@ -90,31 +89,31 @@ test: lint template
9089 --charts $(HELM_CHARTS_DIR ) /infra && \
9190 ct install --chart-dirs $(HELM_CHARTS_DIR ) \
9291 --charts $(HELM_CHARTS_DIR ) /mlflow --set replicated.enabled=false; \
93- fi
92+ fi ; \
9493 echo " Full installation test completed successfully."
9594
9695# Target to login to the Replicated registry
9796.PHONY : registry-login
9897registry-login :
99- echo " Authenticating with Replicated registry..."
98+ echo " Authenticating with Replicated registry..." ; \
10099 if [ -z " $$ REPLICATED_LICENSE_ID" ]; then \
101100 echo " Error: REPLICATED_LICENSE_ID environment variable must be set" ; \
102101 exit 1; \
103- fi
102+ fi ; \
104103 helm registry login registry.replicated.com \
105104 --username=" $$ REPLICATED_LICENSE_ID" \
106- --password=" $$ REPLICATED_LICENSE_ID"
105+ --password=" $$ REPLICATED_LICENSE_ID" ; \
107106 echo " Registry login successful."
108107
109108# Target to test Helm installation with charts from Replicated registry
110109.PHONY : test-replicated-helm
111110test-replicated-helm : registry-login
112- echo " Running Helm installation test with charts from Replicated registry..."
113- echo " Note: This requires REPLICATED_APP and REPLICATED_CHANNEL env vars."
111+ echo " Running Helm installation test with charts from Replicated registry..." ; \
112+ echo " Note: This requires REPLICATED_APP and REPLICATED_CHANNEL env vars." ; \
114113 if [ -z " $$ REPLICATED_APP" ] || [ -z " $$ REPLICATED_CHANNEL" ]; then \
115114 echo " Error: REPLICATED_APP and REPLICATED_CHANNEL must be set" ; \
116115 exit 1; \
117- fi
116+ fi ; \
118117 if [ -f ./ct.yaml ]; then \
119118 ct install --config ./ct.yaml \
120119 --chart-repos " replicated=oci://registry.replicated.com/$$ REPLICATED_APP/$$ REPLICATED_CHANNEL" \
@@ -130,7 +129,7 @@ test-replicated-helm: registry-login
130129 ct install \
131130 --chart-repos " replicated=oci://registry.replicated.com/$$ REPLICATED_APP/$$ REPLICATED_CHANNEL" \
132131 --charts " replicated/mlflow" ; \
133- fi
132+ fi ; \
134133 echo " Replicated Helm installation test completed successfully."
135134
136135# Example target to check versions (optional)
@@ -157,7 +156,6 @@ clean: clean-charts clean-templates
157156# Debug target to print environment information
158157.PHONY : debug-env
159158debug-env :
160- set -e; \
161159 echo ' === Debug Environment Information ===' ; \
162160 echo " Shell: $$ SHELL" ; \
163161 echo " PATH: $$ PATH" ; \
@@ -170,7 +168,6 @@ debug-env:
170168# Debug target for testing helm repo commands
171169.PHONY : debug-helm
172170debug-helm :
173- set -e; \
174171 echo " === Testing Helm Commands ===" ; \
175172 echo " Helm version:" ; \
176173 helm version; \
0 commit comments