3 # -------------------------------------------------------------------------
4 # Copyright (c) 2018 AT&T Intellectual Property
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 # -------------------------------------------------------------------------
21 echo "### This is ${WORKSPACE}/scripts/simulator_script.sh"
23 # add here whatever commands is needed to prepare the optf/osdf CSIT testing
26 #echo "i am ${USER} : only non jenkins users may need proxy settings"
27 if [ ${USER} != 'jenkins' ]; then
29 # add proxy settings into this script when you work behind a proxy
30 ${WORKSPACE}/scripts/osdf_proxy_settings.sh ${WORK_DIR}
35 cd ${WORKSPACE}/../test/functest/simulators
37 # check Dockerfile content
41 chmod +x ./build_sim_image.sh
45 docker run -d --name osdf_sim -p "5000:5000" osdf_sim:latest;
47 #wait for docker setup a while
52 echo "logs of the osdf_sim"
53 sudo cat `docker inspect -f '{{.LogPath}}' osdf_sim`
56 OSDF_SIM_IP=`${WORKSPACE}/scripts/get-instance-ip.sh osdf_sim`
57 echo "OSDF_SIM_IP=${OSDF_SIM_IP}"
59 docker inspect osdf_sim
61 ${WORKSPACE}/scripts/wait_for_port.sh ${OSDF_SIM_IP} 5000
64 # wait a while before continuing
67 echo "inspect docker things for tracing purpose"