Fix the error that HELM_REPOSITORY_CACHE is not set if servecm is in the helm list. 74/10874/3
authorTaewan Kim <t25.kim@samsung.com>
Mon, 10 Apr 2023 10:03:08 +0000 (19:03 +0900)
committerTaewan Kim <t25.kim@samsung.com>
Mon, 10 Apr 2023 10:24:34 +0000 (19:24 +0900)
Signed-off-by: Taewan Kim <t25.kim@samsung.com>
Change-Id: I7fc23109fc68796888eb0a6cbe1813083e811c39

bin/install_common_templates_to_helm.sh

index bc6768d..ac7d4d3 100755 (executable)
@@ -24,8 +24,6 @@ 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}
 else
         echo "Found servecm in the helm plugin list. Skip servecm installation."
 fi
@@ -36,6 +34,8 @@ tar xzvf chartmuseum-v0.15.0-linux-386.tar.gz
 chmod +x ./linux-386/chartmuseum
 sudo cp ./linux-386/chartmuseum /usr/local/bin
 
+eval $(helm env | grep HELM_REPOSITORY_CACHE)
+echo ${HELM_REPOSITORY_CACHE}
 helm servecm --port=8879 --context-path=/charts --storage local --storage-local-rootdir $HELM_REPOSITORY_CACHE/local/ <<EOF &
 yes
 EOF