Skip to content

Commit 89e622c

Browse files
committed
fix: ${1} instead of ${i} in install_app function
Signed-off-by: Siddharth Tiwari <[email protected]>
1 parent 84a6877 commit 89e622c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

auto-deploy

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -244,29 +244,29 @@ function install_app() {
244244
# shellcheck disable=SC1090
245245
source <(
246246
cat <<EOF
247-
local ${i}_helm_values_args=()
248-
local ${i}_helm_values_file=\${${i^^}_HELM_UPGRADE_VALUES_FILE:-.gitlab/auto-deploy-${i}-values.yaml}
249-
if [[ -f "\${${i}_helm_values_file}" ]]; then
250-
echo "Using ${i^^} helm values file \${${i}_helm_values_file@Q}"
251-
${i}_helm_values_args=(--values "\${${i}_helm_values_file}")
247+
local ${1}_helm_values_args=()
248+
local ${1}_helm_values_file=\${${1^^}_HELM_UPGRADE_VALUES_FILE:-.gitlab/auto-deploy-${1}-values.yaml}
249+
if [[ -f "\${${1}_helm_values_file}" ]]; then
250+
echo "Using ${1^^} helm values file \${${1}_helm_values_file@Q}"
251+
${1}_helm_values_args=(--values "\${${1}_helm_values_file}")
252252
else
253-
echo "No ${i^^} helm values file found at \${${i}_helm_values_file@Q}"
253+
echo "No ${1^^} helm values file found at \${${1}_helm_values_file@Q}"
254254
fi
255255
256256
# shellcheck disable=SC2086 # POSTGRESQL_HELM_UPGRADE_EXTRA_ARGS -- double quote variables to prevent globbing
257257
helm upgrade --install \
258258
--atomic \
259259
"\${debug_flag[@]}" \
260260
--wait \
261-
--version "\${${i^^}_CHART_VERSION}" \
261+
--version "\${${1^^}_CHART_VERSION}" \
262262
--set fullnameOverride="$name" \
263-
--set image.tag="\${${i^^}_VERSION}" \
264-
--values "${i}-specific-values.yaml" \
265-
"\${${i}_helm_values_args[@]}" \
266-
\${${i^^}_HELM_UPGRADE_EXTRA_ARGS} \
263+
--set image.tag="\${${1^^}_VERSION}" \
264+
--values "${1}-specific-values.yaml" \
265+
"\${${1}_helm_values_args[@]}" \
266+
\${${1^^}_HELM_UPGRADE_EXTRA_ARGS} \
267267
--namespace="${KUBE_NAMESPACE}" \
268268
"$name" \
269-
"bitnami/${i}"
269+
"bitnami/${1}"
270270
EOF
271271
)
272272
}

0 commit comments

Comments
 (0)