Merge "Add support for multiple helm repositories in helm-upload"

This commit is contained in:
Zuul 2019-05-10 22:45:18 +00:00 committed by Gerrit Code Review
commit e3778d017e
2 changed files with 17 additions and 2 deletions

View File

@ -3,4 +3,4 @@ TAR_NAME=helm
TAR="$TAR_NAME-v$VERSION-linux-amd64.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR $FILES_BASE/*"
TIS_PATCH_VER=1
TIS_PATCH_VER=2

View File

@ -22,7 +22,22 @@ fi
RETVAL=0
REINDEX=0
REPO_DIR='/www/pages/helm_charts'
REPO_BASE='/www/pages/helm_charts'
# First argument is always the repo where the charts need to be placed
if [ $# -lt 2 ]; then
echo "Usage: helm-upload <repo name> <chart 1> .. <chart N>"
exit 1
fi
# Make sure the repo directory exists
REPO_DIR="${REPO_BASE}/$1"
if [ ! -e $REPO_DIR ]; then
echo "$REPO_DIR doesn't exist."
exit 1
fi
shift 1
for FILE in "$@"; do
if [ -r $FILE ]; then