diff options
author | 2019-08-07 12:51:06 +0000 | |
---|---|---|
committer | 2019-08-07 12:51:06 +0000 | |
commit | 672a023b6428b39b730aee10d551c25f2692ba5f (patch) | |
tree | 5afd8ff86e52cbc225172169c66a5206c33dac6d /eteHelm-k8s.sh | |
parent | 3f09cba68e5bbd4a4592016fce49e14955bed858 (diff) | |
parent | 1b6baa471cd767eca4da6b44c645110c80987e4a (diff) |
Merge "hv-ves ete script added"
Diffstat (limited to 'eteHelm-k8s.sh')
-rwxr-xr-x | eteHelm-k8s.sh | 12 |
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)) |