Add support for multiple helm repositories in helm-upload

Update the helm-upload script to require specifying a specific helm
repository to use with it's operations.

Change-Id: I4b1a3615a6bd5d0bdd834a1cdf27c05d5a1057a0
Story: 2005424
Task: 30645
Signed-off-by: Robert Church <robert.church@windriver.com>
This commit is contained in:
Robert Church 2019-04-18 15:21:44 -04:00
parent cb06d57cde
commit 1be7dcd3bd
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