Merge "tests-ansible-env-prep: Fix plugin, tests and ops testing on Vagrant"

This commit is contained in:
Zuul 2018-09-27 03:42:21 +00:00 committed by Gerrit Code Review
commit a87b78e87e
2 changed files with 5 additions and 3 deletions

View File

@ -33,6 +33,7 @@ set -xeu
## Vars ----------------------------------------------------------------------
WORKING_DIR="$(readlink -f $(dirname $0))"
OSA_PROJECT_NAME="$(sed -n 's|^project=openstack/\(.*\).git$|\1|p' $(pwd)/.gitreview)"
COMMON_TESTS_PATH="${WORKING_DIR}/tests/common"
TESTING_HOME=${TESTING_HOME:-$HOME}
@ -69,7 +70,7 @@ which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" git
if [[ ! -d "${COMMON_TESTS_PATH}" ]]; then
# The tests repo doesn't need a clone, we can just
# symlink it.
if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
if [[ "${OSA_PROJECT_NAME}" == "openstack-ansible-tests" ]]; then
ln -s "${WORKING_DIR}" "${COMMON_TESTS_PATH}"
# In zuul v3 any dependent repository is placed into

View File

@ -32,6 +32,7 @@ set -e
export TESTING_HOME=${TESTING_HOME:-$HOME}
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
export ROLE_NAME=${ROLE_NAME:-''}
export OSA_PROJECT_NAME="$(sed -n 's|^project=openstack/\(.*\).git$|\1|p' $(pwd)/.gitreview)"
export ANSIBLE_INVENTORY=${ANSIBLE_INVENTORY:-$WORKING_DIR/tests/inventory}
export ANSIBLE_ROLE_REQUIREMENTS_PATH=${ANSIBLE_ROLE_REQUIREMENTS_PATH:-$WORKING_DIR/tests/ansible-role-requirements.yml}
export ANSIBLE_EXTRA_ROLE_DIRS=${ANSIBLE_EXTRA_ROLE_DIRS:-''}
@ -101,7 +102,7 @@ mkdir -p "${ANSIBLE_LOG_DIR}"
if [[ ! -d "${ANSIBLE_PLUGIN_DIR}" ]]; then
# The plugins repo doesn't need a clone, we can just
# symlink it.
if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-plugins" ]]; then
if [[ "${OSA_PROJECT_NAME}" == "openstack-ansible-plugins" ]]; then
ln -s ${WORKING_DIR} "${ANSIBLE_PLUGIN_DIR}"
else
git clone \
@ -113,7 +114,7 @@ fi
if [[ ! -d "${OSA_OPS_DIR}" ]]; then
# The ops repo doesn't need a clone, we can just
# symlink it.
if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-ops" ]]; then
if [[ "${OSA_PROJECT_DIR}" == "openstack-ansible-ops" ]]; then
ln -s ${WORKING_DIR} "${OSA_OPS_DIR}"
else
git clone \