From: Taewan Kim Date: Wed, 5 Apr 2023 08:21:06 +0000 (+0900) Subject: Check if servecm (Chart Manager) is already installed. X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=b1cbee9bc8f32871d055bba61179cafc92f450fb;p=aiml-fw%2Faimlfw-dep.git Check if servecm (Chart Manager) is already installed. Issue-ID: AIMLFW-43 Signed-off-by: Taewan Kim Change-Id: I443c8f0a309d1f5ad20b6869988d67a1d8e9db5e --- 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