3030# Target to package charts and update versions
3131.PHONY : package-and-update
3232package-and-update : add-helm-repositories
33- @ for chart in $(HELM_CHARTS_DIR ) /* ; do \
33+ for chart in $( HELM_CHARTS_DIR) /* ; do \
3434 echo " Packaging $$ chart" ; \
3535 helm package $$ chart -u -d $(KOTS_DIR ) ; \
3636 version=$$(eval $(call get_helm_chart_version,$$chart) ) ; \
@@ -42,44 +42,44 @@ package-and-update: add-helm-repositories
4242# Target to add Helm repositories
4343.PHONY : add-helm-repositories
4444add-helm-repositories :
45- @ helm repo add cnpg https://cloudnative-pg.github.io/charts
46- @ helm repo add minio https://operator.min.io/
47- @ helm repo update
45+ helm repo add cnpg https://cloudnative-pg.github.io/charts
46+ helm repo add minio https://operator.min.io/
47+ helm repo update
4848
4949# Target to lint Helm charts using chart-testing
5050.PHONY : lint
5151lint : add-helm-repositories
52- @ echo " Linting Helm charts..."
53- @ if [ -f ./ct.yaml ]; then \
52+ echo " Linting Helm charts..."
53+ if [ -f ./ct.yaml ]; then \
5454 ct lint --config ./ct.yaml --chart-dirs $(HELM_CHARTS_DIR ) --charts $(HELM_CHARTS_DIR ) /mlflow $(HELM_CHARTS_DIR ) /infra; \
5555 else \
5656 echo " Warning: ct.yaml not found. Using default configuration." ; \
5757 ct lint --chart-dirs $(HELM_CHARTS_DIR ) --charts $(HELM_CHARTS_DIR ) /mlflow $(HELM_CHARTS_DIR ) /infra; \
5858 fi
59- @ echo " Linting completed successfully."
59+ echo " Linting completed successfully."
6060
6161# Target to template Helm charts (render templates without installing)
6262# Explicitly disables the Replicated SDK for testing non-SDK scenarios
6363.PHONY : template
6464template : add-helm-repositories
65- @ echo " Templating Helm charts with Replicated SDK disabled..."
66- @ mkdir -p ./rendered-templates
67- @ for chart in $(CHARTS ) ; do \
65+ echo " Templating Helm charts with Replicated SDK disabled..."
66+ mkdir -p ./rendered-templates
67+ for chart in $( CHARTS) ; do \
6868 echo " Rendering templates for $$ chart..." ; \
6969 if [ " $$ chart" = " mlflow" ]; then \
7070 helm template $(HELM_CHARTS_DIR ) /$$ chart --output-dir ./rendered-templates/$$ chart --set replicated.enabled=false --debug; \
7171 else \
7272 helm template $(HELM_CHARTS_DIR ) /$$ chart --output-dir ./rendered-templates/$$ chart --debug; \
7373 fi \
7474 done
75- @ echo " Templates rendered in ./rendered-templates directory."
75+ echo " Templates rendered in ./rendered-templates directory."
7676
7777# Target to run a full install test (requires a Kubernetes cluster)
7878.PHONY : test
7979test : lint template
80- @ echo " Running full chart installation test..."
81- @ echo " Note: This requires a connected Kubernetes cluster."
82- @ if [ -f ./ct.yaml ]; then \
80+ echo " Running full chart installation test..."
81+ echo " Note: This requires a connected Kubernetes cluster."
82+ if [ -f ./ct.yaml ]; then \
8383 ct install --config ./ct.yaml --chart-dirs $(HELM_CHARTS_DIR ) \
8484 --charts $(HELM_CHARTS_DIR ) /infra && \
8585 ct install --config ./ct.yaml --chart-dirs $(HELM_CHARTS_DIR ) \
@@ -91,31 +91,31 @@ test: lint template
9191 ct install --chart-dirs $(HELM_CHARTS_DIR ) \
9292 --charts $(HELM_CHARTS_DIR ) /mlflow --set replicated.enabled=false; \
9393 fi
94- @ echo " Full installation test completed successfully."
94+ echo " Full installation test completed successfully."
9595
9696# Target to login to the Replicated registry
9797.PHONY : registry-login
9898registry-login :
99- @ echo " Authenticating with Replicated registry..."
100- @ if [ -z " $$ REPLICATED_LICENSE_ID" ]; then \
99+ echo " Authenticating with Replicated registry..."
100+ if [ -z " $$ REPLICATED_LICENSE_ID" ]; then \
101101 echo " Error: REPLICATED_LICENSE_ID environment variable must be set" ; \
102102 exit 1; \
103103 fi
104- @ helm registry login registry.replicated.com \
104+ helm registry login registry.replicated.com \
105105 --username=" $$ REPLICATED_LICENSE_ID" \
106106 --password=" $$ REPLICATED_LICENSE_ID"
107- @ echo " Registry login successful."
107+ echo " Registry login successful."
108108
109109# Target to test Helm installation with charts from Replicated registry
110110.PHONY : test-replicated-helm
111111test-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."
114- @ if [ -z " $$ REPLICATED_APP" ] || [ -z " $$ REPLICATED_CHANNEL" ]; then \
112+ echo " Running Helm installation test with charts from Replicated registry..."
113+ echo " Note: This requires REPLICATED_APP and REPLICATED_CHANNEL env vars."
114+ if [ -z " $$ REPLICATED_APP" ] || [ -z " $$ REPLICATED_CHANNEL" ]; then \
115115 echo " Error: REPLICATED_APP and REPLICATED_CHANNEL must be set" ; \
116116 exit 1; \
117117 fi
118- @ if [ -f ./ct.yaml ]; then \
118+ if [ -f ./ct.yaml ]; then \
119119 ct install --config ./ct.yaml \
120120 --chart-repos " replicated=oci://registry.replicated.com/$$ REPLICATED_APP/$$ REPLICATED_CHANNEL" \
121121 --charts " replicated/infra" && \
@@ -131,12 +131,12 @@ test-replicated-helm: registry-login
131131 --chart-repos " replicated=oci://registry.replicated.com/$$ REPLICATED_APP/$$ REPLICATED_CHANNEL" \
132132 --charts " replicated/mlflow" ; \
133133 fi
134- @ echo " Replicated Helm installation test completed successfully."
134+ echo " Replicated Helm installation test completed successfully."
135135
136136# Example target to check versions (optional)
137137.PHONY : check-versions
138138check-versions :
139- @ for chart_dir in $(HELM_CHARTS_DIR ) /* ; do \
139+ for chart_dir in $( HELM_CHARTS_DIR) /* ; do \
140140 if [ -d $$ chart_dir ]; then \
141141 version=$$(eval $(call get_helm_chart_version,$$chart_dir) ) ; \
142142 echo " $$ chart_dir version: $$ version" ; \
0 commit comments