Fix chart verify job errot for aaf and portal charts
[it/dep.git] / ric-infra / 40-Credential / bin / uninstall
index c820c7f..c45136f 100755 (executable)
 ################################################################################
 
 
-OVERRIDEYAML=$1
+COMPONENTS="credential"
 
+echo "Undeploying RIC infra components [$COMPONENTS]"
 
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
 
+for component in $COMPONENTS; do
+    RELEASE_LIST=$(helm list | grep "$component" | awk '{print $1}')
+    if [ ! -z "$RELEASE_LIST" ];then
+        helm delete --purge $RELEASE_LIST
+    fi
 
-source $DIR/../etc/credential.conf
-
-if [ -z "$RICPLT_RELEASE_NAME" ];then
-   RELEASE_NAME=$helm_release_name
-else
-   RELEASE_NAME=$RICPLT_RELEASE_NAME
-fi
-if [ -z "$RICPLT_NAMESPACE" ];then
-   NAMESPACE=$namespace
-else
-   NAMESPACE=$RICPLT_NAMESPACE
-fi
-
-helm delete --purge "${RELEASE_NAME}-${NAMESPACE}-credential"
-
+done