Skip to content

Commit

Permalink
Details
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Nov 17, 2024
1 parent 85ba419 commit c8b15fb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/s
ENV KANIKO_SCRIPTS=/
ENV HELM_SCRIPTS=/

COPY --from=ghcr.io/npo-poms/kaniko:main /dockerfile-functions.sh $KANIKO_SCRIPTS
COPY --from=ghcr.io/npo-poms/kaniko:6 /dockerfile-functions.sh $KANIKO_SCRIPTS
COPY scripts/* $HELM_SCRIPTS


Expand Down
17 changes: 9 additions & 8 deletions scripts/helm-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,31 +63,32 @@ function setup_oc_helm() {
--version $CHART_VERSION \
--untar

VALUES=()
VALUESA=()
if [ "$DIR" != "" ] ; then
if [ -e ./$DIR/helm/values-$OS_ENV.yaml ]; then
VALUES+=(./$DIR/helm/values-$OS_ENV.yaml)
VALUESA+=("./$DIR/helm/values-$OS_ENV.yaml")
else
echo "No ./$DIR/helm/values-$OS_ENV.yaml found"
fi
if [ -e ./$DIR/helm/values.yaml ]; then
VALUES+=(./$DIR/helm/values.yaml)
VALUESA+=("./$DIR/helm/values.yaml")
else
echo "No ./$DIR/helm/values.yaml found"
fi
fi
if [ -e ./values-$OS_ENV.yaml ]; then
VALUES+=(./values-$OS_ENV.yaml)
VALUESA+=("./values-$OS_ENV.yaml")
else
echo "No ./values-$OS_ENV.yaml found"
fi

if [ -e ./values.yaml ]; then
VALUES+=(./values.yaml)
VALUESA+=(./values.yaml)
else
echo "No ./values.yaml found"
fi
export VALUES=$(printf '%s\n' "$(IFS=,; printf '%s' "${VALUES[*]}")")
export VALUES
VALUES=$(printf '%s\n' "$(IFS=,; printf '%s' "${VALUESA[*]}")")
}

# deploys application using helm
Expand Down Expand Up @@ -150,9 +151,9 @@ function deploy_application() {
cp -Rv $DIR/helm/configMaps-$OS_ENV/* $CHART_PROJECT_NAME/configMaps
fi

export VALUES=""
export VALUES=()
if [ -e ./$DIR/helm/values-$OS_ENV.yaml ]; then
export VALUES=./$DIR/helm/values-$OS_ENV.yaml
export VALUES=("./$DIR/helm/values-$OS_ENV.yaml")
else
echo "No ./$DIR/helm/values-$OS_ENV.yaml found"
fi
Expand Down

0 comments on commit c8b15fb

Please sign in to comment.