3 [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
5 # labconfig is used only for joid
8 if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
9 instack_mac=$(sudo virsh domiflist undercloud | grep default | \
10 grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
11 INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
12 sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
13 if [[ -n $(sudo iptables -L FORWARD |grep "REJECT"|grep "reject-with icmp-port-unreachable") ]]; then
14 #note: this happens only in opnfv-lf-pod1
15 sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
16 sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
18 elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
19 # If production lab then creds may be retrieved dynamically
20 # creds are on the jumphost, always in the same folder
21 labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/openrc"
22 # If dev lab, credentials may not be the default ones, just provide a path to put them into docker
23 # replace the default one by the customized one provided by jenkins config
26 opts="--privileged=true --rm"
27 envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
28 -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} \
29 -e YARDSTICK_BRANCH=${GIT_BRANCH##origin/} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
31 # Pull the latest image
32 docker pull opnfv/yardstick:$DOCKER_TAG >$redirect
35 cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick \
36 exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}"
37 echo "Yardstick: Running docker cmd: ${cmd}"
40 echo "Yardstick: done!"