summaryrefslogtreecommitdiffstats
path: root/eteHelm-k8s.sh
diff options
context:
space:
mode:
Diffstat (limited to 'eteHelm-k8s.sh')
-rwxr-xr-xeteHelm-k8s.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/eteHelm-k8s.sh b/eteHelm-k8s.sh
index 0895208..9f8cbb2 100755
--- a/eteHelm-k8s.sh
+++ b/eteHelm-k8s.sh
@@ -19,8 +19,9 @@
# Please clean up logs when you are done...
#
if [ "$1" == "" ] ; then
- echo "Usage: eteHelm-k8s.sh [namespace]"
+ echo "Usage: eteHelm-k8s.sh [namespace] [execscript]"
echo " list projects via helm list and runs health-check with those tags except dev and dev-consul"
+ echo " [execscript] - optional parameter to execute user custom scripts located in scripts/helmscript directory"
exit
fi
@@ -38,8 +39,17 @@ do
TAGS="$TAGS -i $project"
done
+DIR=$(dirname "$0")
+SCRIPTDIR=scripts/helmscript
ETEHOME=/var/opt/ONAP
+
+if [[ "${!#}" == "execscript" ]]; then
+ for script in $(ls -1 "$DIR/$SCRIPTDIR"); do
+ [ -f "$DIR/$SCRIPTDIR/$script" ] && [ -x "$DIR/$SCRIPTDIR/$script" ] && source "$DIR/$SCRIPTDIR/$script"
+ done
+fi
+
export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l")
OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_helmlist
DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90))