aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xkubernetes/helm/plugins/deploy/deploy.sh25
-rw-r--r--kubernetes/uui/components/uui-server/resources/entrypoint/run.sh6
2 files changed, 20 insertions, 11 deletions
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh
index 36853baa1f..858a5e0b7d 100755
--- a/kubernetes/helm/plugins/deploy/deploy.sh
+++ b/kubernetes/helm/plugins/deploy/deploy.sh
@@ -284,14 +284,19 @@ deploy() {
if [ $SUBCHART_ENABLED -eq 1 ]; then
deploy_subchart
else
- array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
- n=${#array[*]}
- for i in $(seq $(($n-1)) -1 0); do
- helm del "${array[i]}"
+ reverse_list=
+ for item in $(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}")
+ do
+ reverse_list="$item $reverse_list"
+ done
+ for item in $reverse_list
+ do
+ helm del $item
done
fi
done
+
for subchart in * ; do
SUBCHART_OVERRIDES=$CACHE_SUBCHART_DIR/$subchart/subchart-overrides.yaml
@@ -306,10 +311,14 @@ deploy() {
if [ $SUBCHART_ENABLED -eq 1 ]; then
deploy_subchart
else
- array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
- n=${#array[*]}
- for i in $(seq $(($n-1)) -1 0); do
- helm del "${array[i]}"
+ reverse_list=
+ for item in $(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}")
+ do
+ reverse_list="$item $reverse_list"
+ done
+ for item in $reverse_list
+ do
+ helm del $item
done
fi
done
diff --git a/kubernetes/uui/components/uui-server/resources/entrypoint/run.sh b/kubernetes/uui/components/uui-server/resources/entrypoint/run.sh
index f96dd74bd3..283d55b741 100644
--- a/kubernetes/uui/components/uui-server/resources/entrypoint/run.sh
+++ b/kubernetes/uui/components/uui-server/resources/entrypoint/run.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
{{/*
#
# Copyright 2016-2017 ZTE Corporation.
@@ -28,7 +28,7 @@ sleep 10
echo "usecase-ui database init script start..."
dbScript="$main_path/resources/bin/initDB.sh"
-source $dbScript 127.0.0.1 5432 postgres uui
+$dbScript 127.0.0.1 5432 postgres uui
echo "usecase-ui database init script finished normally..."
JAVA_PATH="$JAVA_HOME/bin/java"
@@ -40,4 +40,4 @@ jar_path="$main_path/usecase-ui-server.jar"
echo @jar_path@ $jar_path
echo "Starting usecase-ui-server..."
-$JAVA_PATH $JAVA_OPTS -classpath $jar_path -jar $jar_path $SPRING_OPTS \ No newline at end of file
+$JAVA_PATH $JAVA_OPTS -classpath $jar_path -jar $jar_path $SPRING_OPTS