diff options
author | JingLu5 <lvjing5@huawei.com> | 2017-07-10 07:00:25 +0000 |
---|---|---|
committer | JingLu5 <lvjing5@huawei.com> | 2017-07-10 08:07:44 +0000 |
commit | e405d682bb55327d25d881b3fa27a60d7c4110e9 (patch) | |
tree | d345e079b43ebc48e493ec0c5487c823a02f99be | |
parent | 1d595e455c0afc2e006bbf3bbf05c550790f8d31 (diff) |
[Yardstick]Use volume-binding to provide rc file to yardstick container
The 'fetch_os_creds' script is preferred to run on jump server to get OS creds as mand projects do,
this patch unify the way to get OS creds by volume-binding.
Change-Id: I0da54545ee088458c952f216945c29232d487692
Signed-off-by: JingLu5 <lvjing5@huawei.com>
-rw-r--r-- | jjb/yardstick/yardstick-daily-jobs.yml | 2 | ||||
-rwxr-xr-x | jjb/yardstick/yardstick-daily.sh | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/jjb/yardstick/yardstick-daily-jobs.yml b/jjb/yardstick/yardstick-daily-jobs.yml index ff1d47eb4..41840d59c 100644 --- a/jjb/yardstick/yardstick-daily-jobs.yml +++ b/jjb/yardstick/yardstick-daily-jobs.yml @@ -276,7 +276,7 @@ - description-setter: description: "POD: $NODE_NAME" - 'yardstick-cleanup' - #- 'yardstick-fetch-os-creds' + - 'yardstick-fetch-os-creds' - 'yardstick-{testsuite}' - 'yardstick-store-results' 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} |