From: chenjiankun Date: Mon, 28 Aug 2017 08:48:11 +0000 (+0000) Subject: Fetch admin.conf from master on kubernetes scenario X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=7b0e93e9ba54a9d88a394f98dc3f6c930600265d;p=releng.git Fetch admin.conf from master on kubernetes scenario Now we have joid deploy kubernetes scenario We need admin.conf when run test case We can fetch admin.conf by: juju scp kubernetes-master/0:config admin.conf Also we need a jenkins job to fetch it. Change-Id: I13a6a17ca13e247cfc50774bf5104480fc03631a Signed-off-by: chenjiankun --- diff --git a/jjb/yardstick/yardstick-daily-jobs.yml b/jjb/yardstick/yardstick-daily-jobs.yml index 39935abc2..4536543a0 100644 --- a/jjb/yardstick/yardstick-daily-jobs.yml +++ b/jjb/yardstick/yardstick-daily-jobs.yml @@ -281,6 +281,7 @@ description: "POD: $NODE_NAME" - 'yardstick-cleanup' - 'yardstick-fetch-os-creds' + - 'yardstick-fetch-k8s-conf' - 'yardstick-{testsuite}' - 'yardstick-store-results' @@ -310,6 +311,12 @@ - shell: !include-raw: ../../utils/fetch_os_creds.sh +- builder: + name: yardstick-fetch-k8s-conf + builders: + - shell: + !include-raw: ./yardstick-get-k8s-conf.sh + - builder: name: yardstick-store-results builders: @@ -515,4 +522,4 @@ - trigger: name: 'yardstick-daily-huawei-pod4-trigger' triggers: - - timed: '' \ No newline at end of file + - timed: '' diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index 56d087473..ccee9715f 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -19,11 +19,15 @@ if [[ ${INSTALLER_TYPE} == 'apex' ]]; 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 - 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 + if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then + rc_file_vol="-v $LAB_CONFIG/admin.conf:/etc/yardstick/admin.conf" + else + # If production lab then creds may be retrieved dynamically + # creds are on the jumphost, always in the same folder + 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 + fi elif [[ ${INSTALLER_TYPE} == 'compass' && ${BRANCH} == 'master' ]]; then cacert_file_vol="-v ${HOME}/os_cacert:/etc/yardstick/os_cacert" echo "export OS_CACERT=/etc/yardstick/os_cacert" >> ${HOME}/opnfv-openrc.sh diff --git a/jjb/yardstick/yardstick-get-k8s-conf.sh b/jjb/yardstick/yardstick-get-k8s-conf.sh new file mode 100755 index 000000000..ce1e94dde --- /dev/null +++ b/jjb/yardstick/yardstick-get-k8s-conf.sh @@ -0,0 +1,7 @@ +set -e + +dest_path="$HOME/admin.conf" + +if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then + juju scp kubernetes-master/0:config "${dest_path}" +fi