From a8109dda477e9ee7a3db55b495d95587ec5b7822 Mon Sep 17 00:00:00 2001 From: Aleksei Lunin <alexey.lunin@vereign.com> Date: Fri, 3 Nov 2023 02:35:50 +0200 Subject: [PATCH] experiments --- infra/ocm-chart/deploy-all.sh | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/infra/ocm-chart/deploy-all.sh b/infra/ocm-chart/deploy-all.sh index 4aabd576..d33b5c53 100644 --- a/infra/ocm-chart/deploy-all.sh +++ b/infra/ocm-chart/deploy-all.sh @@ -1 +1,29 @@ -helm install ocm-instance1 mychart/ -f ocm1-values.yaml +#!/bin/bash + +# Path to the Helm chart +CHART_PATH="." + +# Get a list of all values-*.yaml files in the current directory +VALUES_FILES=$(ls values*.yaml) + +# Loop over each values file +for VALUES_FILE in $VALUES_FILES +do + # Extract the base name without extension + BASE_NAME=$(basename "$VALUES_FILE" .yaml) + + # Use the base name as the release name + RELEASE_NAME="ocm_$BASE_NAME" + + # Run helm install with the found values file + echo "Deploying $RELEASE_NAME with $VALUES_FILE" + helm install "$RELEASE_NAME" "$CHART_PATH" -f "./$VALUES_FILE" + + # Check for errors + if [ $? -ne 0 ]; then + echo "Helm install failed for $VALUES_FILE" + exit 1 + fi +done + +echo "Helm install completed for all values files." -- GitLab