blob: befe142311a90fd37b11df9bb619dcd984d4fda8 [file] [log] [blame]
vaibhavjayasea9aee02018-08-31 06:22:26 +00001# Copyright © 2018 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Mandeep Khindad6ea9872017-06-24 11:49:37 -040015#!/bin/bash
16
17#
18# Run the testsuite for the passed tag. Valid tags are ete, health, closedloop, instantiate
19# Please clean up logs when you are done...
20# Note: Do not run multiple concurrent ete.sh as the --display is not parameterized and tests will collide
21#
BorislavG8bfc6cf2018-02-27 15:04:26 +000022if [ "$1" == "" ] || [ "$2" == "" ]; then
Helen Chen2d722902018-04-12 18:57:14 -070023 echo "Usage: ete-k8s.sh [namespace] [ health | ete | closedloop | instantiate | distribute ]"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040024 exit
25fi
26
Brian Freeman6b89ba02018-04-23 20:54:13 -050027
BorislavG8bfc6cf2018-02-27 15:04:26 +000028export NAMESPACE="$1"
Brian Freeman6b89ba02018-04-23 20:54:13 -050029
30POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot)
31
32
BorislavG8bfc6cf2018-02-27 15:04:26 +000033export TAGS="-i $2"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040034export ETEHOME=/var/opt/OpenECOMP_ETE
Brian Freeman6b89ba02018-04-23 20:54:13 -050035export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l")
36export OUTPUT_FOLDER=ETE_$(printf %04d $GLOBAL_BUILD_NUMBER)_$2
37
38#export OUTPUT_FOLDER=ETE_$$
Mandeep Khindad6ea9872017-06-24 11:49:37 -040039
40VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py"
41VARIABLES="-v GLOBAL_BUILD_NUMBER:$$"
42
BorislavG8bfc6cf2018-02-27 15:04:26 +000043kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display 88
Brian Freeman6b89ba02018-04-23 20:54:13 -050044