Helm charts dir commenting causes / dir copying 75/77775/13
authorSamuli Silvius <s.silvius@partner.samsung.com>
Mon, 4 Feb 2019 10:52:20 +0000 (12:52 +0200)
committerSamuli Silvius <s.silvius@partner.samsung.com>
Tue, 12 Feb 2019 07:35:15 +0000 (09:35 +0200)
HELM_CHARTS_DIR in package.conf is unnecessarily mandatory.
When commenting out this variable, packaging script copies
machine's root directory content into package.

This commit will make HELM_CHARTS_DIR optional and its
existence is checked in package.sh script.

Issue-ID: OOM-1626

Change-Id: I7b5d135ab130a28491e7223b66f26b50ccce5fca
Signed-off-by: Samuli Silvius <s.silvius@partner.samsung.com>
build/package.conf
build/package.sh

index 1141798..c3bbeee 100644 (file)
@@ -16,8 +16,7 @@ SOFTWARE_PACKAGE_BASENAME="onap-offline"
 ########################
 
 # directory with helm charts
-HELM_CHARTS_DIR="/root/oom"
-
+#HELM_CHARTS_DIR=~/myclones/casablanca_oom/
 
 ###################
 # Packages addons #
index 0e4f121..fd9b9e7 100755 (executable)
@@ -105,10 +105,13 @@ function create_sw_package {
     done
 
     # Helm charts handling
-    echo "Helm charts handling"
-    # Copy charts available for ansible playbook to use/move them to target server/dir
-    mkdir -p "${pkg_root}"/ansible/application/helm_charts
-    cp -r "${HELM_CHARTS_DIR}"/* "${pkg_root}"/ansible/application/helm_charts
+    if [ ! -z "${HELM_CHARTS_DIR}" ];
+    then
+        echo "Helm charts handling"
+        # Copy charts available for ansible playbook to use/move them to target server/dir
+        mkdir -p "${pkg_root}"/ansible/application/helm_charts
+        cp -r "${HELM_CHARTS_DIR}"/* "${pkg_root}"/ansible/application/helm_charts
+    fi
 
     # Add metadata to the package
     add_metadata "${pkg_root}"/package.info