diff options
author | marekpl <marek.pondel@nokia.com> | 2019-08-01 15:19:41 +0200 |
---|---|---|
committer | marekpl <marek.pondel@nokia.com> | 2019-08-01 16:58:42 +0200 |
commit | 12dca2ec402ca3113033a0577a18c7cf6ef0e9b7 (patch) | |
tree | 2f7d9052fe00a3ff58632a8be250c2ed0f10e822 | |
parent | 1367ea56a7b0e66ac70f794411a6025c613121f8 (diff) |
flag for ete custom script execution before robot run
flag for ete custom script execution before robot run
Issue-ID: DCAEGEN2-1226
Signed-off-by: marekpl <marek.pondel@nokia.com>
Change-Id: Iea3296e585d073092ffcf0e143bf94903580ffcd
-rwxr-xr-x | ete-k8s.sh | 12 | ||||
-rw-r--r-- | etescripts/README | 1 |
2 files changed, 12 insertions, 1 deletions
@@ -19,7 +19,7 @@ # Please clean up logs when you are done... # if [ "$1" == "" ] || [ "$2" == "" ]; then - echo "Usage: ete-k8s.sh [namespace] [tag]" + echo "Usage: ete-k8s.sh [namespace] [tag] [loadScript]" echo "" echo " List of test case tags (filename for intent: tag)" echo "" @@ -64,6 +64,16 @@ POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot) TAGS="-i $2" +DIR=$(dirname "$0") +ETESCRIPTDIR=etescripts +ETESCRIPTEXEC=${3:-} + +if [[ "$2" == "ete" ]] && [[ "$ETESCRIPTEXEC" == "loadScript" ]]; then + for script in $(ls -1 "$DIR/$ETESCRIPTDIR"); do + [ -f "$DIR/$ETESCRIPTDIR/$script" ] && [ -x "$DIR/$ETESCRIPTDIR/$script" ] && "$DIR/$ETESCRIPTDIR/$script" + done +fi + ETEHOME=/var/opt/ONAP 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_$2 diff --git a/etescripts/README b/etescripts/README new file mode 100644 index 0000000..d620838 --- /dev/null +++ b/etescripts/README @@ -0,0 +1 @@ +Directory contains scripts that will be run before 'ete' robot testcases execution. |