summaryrefslogtreecommitdiffstats
path: root/jjb/yardstick/yardstick-daily.sh
diff options
context:
space:
mode:
authorJun Li <matthew.lijun@huawei.com>2017-07-12 00:51:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-07-12 00:51:51 +0000
commitd51b7000c97e8418e81dfbafeebd4bb2ffece7fb (patch)
tree727120415cf01fcee76758ae6fa70dc24d11fb11 /jjb/yardstick/yardstick-daily.sh
parent83fef5968f000a56ecebf21ae9b089a6a39b6e33 (diff)
parente405d682bb55327d25d881b3fa27a60d7c4110e9 (diff)
Merge "[Yardstick]Use volume-binding to provide rc file to yardstick container"
Diffstat (limited to 'jjb/yardstick/yardstick-daily.sh')
-rwxr-xr-xjjb/yardstick/yardstick-daily.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh
index 1c2abad3f..cf37ac262 100755
--- a/jjb/yardstick/yardstick-daily.sh
+++ b/jjb/yardstick/yardstick-daily.sh
@@ -2,9 +2,9 @@
set -e
[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
-# labconfig is used only for joid
-labconfig=""
+rc_file_vol=""
sshkey=""
+
if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
instack_mac=$(sudo virsh domiflist undercloud | grep default | \
grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
@@ -15,12 +15,16 @@ if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
fi
-elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
+fi
+
+if [[ ${INSTALLER_TYPE} == 'joid' ]]; then
# If production lab then creds may be retrieved dynamically
# creds are on the jumphost, always in the same folder
- labconfig="-v $LAB_CONFIG/admin-openrc:/etc/yardstick/openstack.creds"
+ rc_file_vol="-v $LAB_CONFIG/admin-openrc:/etc/yardstick/openstack.creds"
# If dev lab, credentials may not be the default ones, just provide a path to put them into docker
# replace the default one by the customized one provided by jenkins config
+else
+ rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/etc/yardstick/openstack.creds"
fi
# Set iptables rule to allow forwarding return traffic for container
@@ -46,7 +50,7 @@ sudo rm -rf ${dir_result}/*
map_log_dir="-v ${dir_result}:/tmp/yardstick"
# Run docker
-cmd="sudo docker run ${opts} ${envs} ${labconfig} ${map_log_dir} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \
+cmd="sudo docker run ${opts} ${envs} ${rc_file_vol} ${map_log_dir} ${sshkey} opnfv/yardstick:${DOCKER_TAG} \
exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}"
echo "Yardstick: Running docker cmd: ${cmd}"
${cmd}