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

Commit

Permalink
Merge pull request #39 from swade1987/master
Browse files Browse the repository at this point in the history
Setting repo name to be the md5sum of the registry
  • Loading branch information
stefanprodan authored Jun 12, 2020
2 parents 97343e5 + 6b5b925 commit e1cc35f
Showing 1 changed file with 8 additions and 4 deletions.
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

0 comments on commit e1cc35f

Please sign in to comment.