Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Setting repo name to be the md5sum of the registry #39

Merged
merged 1 commit into from
Jun 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/hrval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,17 @@ function download {
CHART_NAME=$(yq r ${1} spec.chart.name)
CHART_VERSION=$(yq r ${1} spec.chart.version)
CHART_DIR=${2}/${CHART_NAME}

CHART_REPO_MD5=`/bin/echo $CHART_REPO | /usr/bin/md5sum | cut -f1 -d" "`

if [[ ${HELM_VER} == "v3" ]]; then
helmv3 repo add ${CHART_NAME} ${CHART_REPO}
helmv3 fetch --version ${CHART_VERSION} --untar ${CHART_NAME}/${CHART_NAME} --untardir ${2}
helmv3 repo add ${CHART_REPO_MD5} ${CHART_REPO}
helm3 repo update
helmv3 fetch --version ${CHART_VERSION} --untar ${CHART_REPO_MD5}/${CHART_NAME} --untardir ${2}
else
helm repo add ${CHART_NAME} ${CHART_REPO}
helm fetch --version ${CHART_VERSION} --untar ${CHART_NAME}/${CHART_NAME} --untardir ${2}
helm repo add ${CHART_REPO_MD5} ${CHART_REPO}
helm repo update
helm fetch --version ${CHART_VERSION} --untar ${CHART_REPO_MD5}/${CHART_NAME} --untardir ${2}
fi

echo ${CHART_DIR}
Expand Down