Fix generate-tempestconf-file role
The role has been using python-tempestconf master branch when gating refstack-client or python-tempestconf patches. This patch adds a new argument to setup_env script which can be used to specify a path to python-tempestconf source code. This argument is used, when running the setup_env script from the role, to point the script to the zuul source of python-tempestconf code which contains the newest commits. Change-Id: I65f9043a7bb0e6f045b6442679dd99dbd6aeb2de
This commit is contained in:
parent
f529917916
commit
1037f945f4
@ -5,13 +5,11 @@
|
||||
- openstack-python36-jobs
|
||||
check:
|
||||
jobs:
|
||||
- refstack-client-devstack-tempestconf:
|
||||
voting: false
|
||||
- refstack-client-devstack-tempestconf
|
||||
- openstack-tox-py35
|
||||
gate:
|
||||
jobs:
|
||||
- refstack-client-devstack-tempestconf:
|
||||
voting: false
|
||||
- refstack-client-devstack-tempestconf
|
||||
- openstack-tox-py35
|
||||
|
||||
- job:
|
||||
|
@ -1,9 +1,12 @@
|
||||
- block:
|
||||
# python-tempestconf's source code is placed by zuul at the same level
|
||||
# as refstack-client's code, so when the task changes dir to
|
||||
# refstack-client's folder, python-tempestconf is located one folder above
|
||||
- name: Install refstack-client and python-tempestconf
|
||||
shell: |
|
||||
set -ex
|
||||
export PATH=$PATH:/usr/local/sbin:/usr/sbin
|
||||
./setup_env -c master
|
||||
./setup_env -c master -s ../python-tempestconf
|
||||
args:
|
||||
chdir: "{{ refstack_client_src_relative_path }}"
|
||||
executable: /bin/bash
|
||||
@ -46,4 +49,3 @@
|
||||
|
||||
vars:
|
||||
refstack_client_src_relative_path: "{{ zuul.projects['git.openstack.org/openstack/refstack-client'].src_dir }}"
|
||||
tempestconf_src_relative_path: "{{ zuul.projects['git.openstack.org/openstack/python-tempestconf'].src_dir }}"
|
||||
|
13
setup_env
13
setup_env
@ -16,6 +16,7 @@ function usage {
|
||||
echo " If no commit or tag is specified, tempest will be install from commit"
|
||||
echo " -p [ 2 | 3 ] - Uses either python 2.7 or 3.5. Default to python 2.7"
|
||||
echo " -q Run quietly. If .tempest folder exists, refstack-client is considered as installed"
|
||||
echo " -s Use python-tempestconf from the given source (path), used when running f.e. in Zuul"
|
||||
echo " -t Tempest test runner tag. You can specify tag here"
|
||||
echo " ${CHECKOUT_POINT}"
|
||||
exit 1
|
||||
@ -32,7 +33,7 @@ function check_tag {
|
||||
|
||||
# By default tempest uses commit ${CHECKOUT_POINT}
|
||||
|
||||
while getopts c:p:t:qh FLAG; do
|
||||
while getopts c:p:t:qs:h FLAG; do
|
||||
case ${FLAG} in
|
||||
c)
|
||||
CHECKOUT_POINT=${OPTARG}
|
||||
@ -48,6 +49,9 @@ while getopts c:p:t:qh FLAG; do
|
||||
q) #show help
|
||||
QUIET_MODE=true
|
||||
;;
|
||||
s) #show help
|
||||
TEMPESTCONF_SOURCE=${OPTARG}
|
||||
;;
|
||||
h) #show help
|
||||
usage
|
||||
;;
|
||||
@ -62,7 +66,12 @@ done
|
||||
WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
TEMPEST_DIR=${REFSTACK_CLIENT_TEMPEST_DIR:-${WORKDIR}/.tempest}
|
||||
if [ -z ${TEMPESTCONF_SOURCE} ]; then
|
||||
TEMPESTCONF_DIR=${REFSTACK_CLIENT_TEMPEST_DIR:-${WORKDIR}/.tempestconf}
|
||||
else
|
||||
TEMPESTCONF_DIR=${TEMPESTCONF_SOURCE}
|
||||
fi
|
||||
|
||||
# Checkout tempest on specified tag
|
||||
if [ -d "${TEMPEST_DIR}" ]; then
|
||||
[ ${QUIET_MODE} ] && echo 'Looks like RefStack client is already installed' && exit 0
|
||||
@ -108,7 +117,9 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z ${TEMPESTCONF_SOURCE} ]; then
|
||||
git clone https://git.openstack.org/openstack/python-tempestconf.git ${TEMPESTCONF_DIR}
|
||||
fi
|
||||
|
||||
git clone https://git.openstack.org/openstack/tempest.git ${TEMPEST_DIR}
|
||||
cd ${TEMPEST_DIR}
|
||||
|
Loading…
x
Reference in New Issue
Block a user