From b1cbee9bc8f32871d055bba61179cafc92f450fb Mon Sep 17 00:00:00 2001 From: Taewan Kim Date: Wed, 5 Apr 2023 17:21:06 +0900 Subject: [PATCH] Check if servecm (Chart Manager) is already installed. Issue-ID: AIMLFW-43 Signed-off-by: Taewan Kim Change-Id: I443c8f0a309d1f5ad20b6869988d67a1d8e9db5e --- bin/install_common_templates_to_helm.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/install_common_templates_to_helm.sh b/bin/install_common_templates_to_helm.sh index 88e8c10..3b8eaf9 100755 --- a/bin/install_common_templates_to_helm.sh +++ b/bin/install_common_templates_to_helm.sh @@ -17,12 +17,18 @@ # ================================================================================== #!/bin/bash +#set -e -echo "Installing servecm (Chart Manager) and common templates to helm3" +if [ -z $(helm plugin list | grep servecm | awk '{print $1}') ]; +then + echo "Installing servecm (Chart Manager) and common templates to helm3" -helm plugin install https://github.com/jdolitsky/helm-servecm -eval $(helm env |grep HELM_REPOSITORY_CACHE) -echo ${HELM_REPOSITORY_CACHE} + helm plugin install https://github.com/jdolitsky/helm-servecm + eval $(helm env | grep HELM_REPOSITORY_CACHE) + echo ${HELM_REPOSITORY_CACHE} +else + echo "Found servecm in the helm plugin list. Skip servecm installation." +fi #The hardcoded location does not work anymore, Reference: change similar to RIC-966 updating chartmuseum and docker refs curl -LO https://get.helm.sh/chartmuseum-v0.15.0-linux-386.tar.gz -- 2.16.6