diff options
author | chenjiankun <chenjiankun1@huawei.com> | 2017-08-28 08:48:11 +0000 |
---|---|---|
committer | chenjiankun <chenjiankun1@huawei.com> | 2017-08-28 08:48:11 +0000 |
commit | 7b0e93e9ba54a9d88a394f98dc3f6c930600265d (patch) | |
tree | 23cdccd0ee5c0786f81ace06516d82b9c6e8e549 /jjb/yardstick | |
parent | 0889958d6eaa4eff43df7fd4b7c34f16de41fc0b (diff) |
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 <chenjiankun1@huawei.com>
Diffstat (limited to 'jjb/yardstick')
-rw-r--r-- | jjb/yardstick/yardstick-daily-jobs.yml | 9 | ||||
-rwxr-xr-x | jjb/yardstick/yardstick-daily.sh | 14 | ||||
-rwxr-xr-x | jjb/yardstick/yardstick-get-k8s-conf.sh | 7 |
3 files changed, 24 insertions, 6 deletions
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' @@ -311,6 +312,12 @@ !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: - shell: @@ -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 |