Update vars and test tooling for Pike

Change-Id: I2a03fc4c2cad9bd2b6d6b929c46715471cdfe719
This commit is contained in:
Jesse Pretorius 2018-01-17 14:22:46 +00:00
parent 1028551e6a
commit c9d59a9792
6 changed files with 43 additions and 42 deletions

View File

@ -2,3 +2,4 @@
host=review.openstack.org
port=29418
project=openstack/openstack-ansible-os_monasca-agent.git
defaultbranch=stable/pike

View File

@ -22,7 +22,7 @@ monasca_agent_pip_package_state: "latest"
monasca_agent_developer_mode: false
monasca_agent_git_repo: "https://git.openstack.org/openstack/monasca-agent"
monasca_agent_git_install_branch: master
monasca_agent_git_install_branch: stable/pike
monasca_agent_developer_constraints:
- "git+{{ monasca_agent_git_repo }}@{{ monasca_agent_git_install_branch }}#egg=monasca-agent"

View File

@ -49,24 +49,12 @@ install_pkg_deps() {
eval sudo $pkg_mgr_cmd $pkg_deps
}
git_clone_repo() {
if [[ ! -d tests/common ]]; then
# The tests repo doesn't need a clone, we can just
# symlink it.
if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
ln -s ${WORKING_DIR} ${WORKING_DIR}/tests/common
else
git clone \
https://git.openstack.org/openstack/openstack-ansible-tests \
tests/common
fi
fi
}
# Install the host distro package dependencies
install_pkg_deps
git_clone_repo
# Clone the tests repo for access to the common test script
source tests/tests-repo-clone.sh
# start executing the main test script
# Execute the common test script
source tests/common/run_tests_common.sh

View File

@ -1,28 +1,28 @@
- name: apt_package_pinning
src: https://git.openstack.org/openstack/openstack-ansible-apt_package_pinning
scm: git
version: master
version: stable/pike
- name: pip_install
src: https://git.openstack.org/openstack/openstack-ansible-pip_install
scm: git
version: master
version: stable/pike
- name: openstack_hosts
src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts
scm: git
version: master
version: stable/pike
- name: lxc_hosts
src: https://git.openstack.org/openstack/openstack-ansible-lxc_hosts
scm: git
version: master
version: stable/pike
- name: lxc_container_create
src: https://git.openstack.org/openstack/openstack-ansible-lxc_container_create
scm: git
version: master
version: stable/pike
- name: galera_client
src: https://git.openstack.org/openstack/openstack-ansible-galera_client
scm: git
version: master
version: stable/pike
- name: openstack_openrc
src: https://git.openstack.org/openstack/openstack-ansible-openstack_openrc
scm: git
version: master
version: stable/pike

View File

@ -33,6 +33,7 @@ set -e
export TESTING_HOME=${TESTING_HOME:-$HOME}
export WORKING_DIR=${WORKING_DIR:-$(pwd)}
export CLONE_UPGRADE_TESTS=${CLONE_UPGRADE_TESTS:-no}
export ZUUL_TESTS_CLONE_LOCATION="/home/zuul/src/git.openstack.org/openstack/openstack-ansible-tests"
## Functions -----------------------------------------------------------------
@ -52,7 +53,11 @@ EOF
# If zuul-cloner is present, use it so that we
# also include any dependent patches from the
# tests repo noted in the commit message.
if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then
# We only want to use zuul-cloner if we detect
# zuul v2 running, so we check for the presence
# of the ZUUL_REF environment variable.
# ref: http://git.openstack.org/cgit/openstack-infra/zuul/tree/zuul/ansible/filter/zuul_filters.py?h=feature/zuulv3#n17
if [[ -x /usr/zuul-env/bin/zuul-cloner ]] && [[ "${ZUUL_REF:-none}" != "none" ]]; then
# Prepare the clonemap for zuul-cloner to use
create_tests_clonemap
@ -74,11 +79,24 @@ if [[ -x /usr/zuul-env/bin/zuul-cloner ]]; then
elif [[ ! -d tests/common ]]; then
# The tests repo doesn't need a clone, we can just
# symlink it.
if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
# symlink it. As zuul v3 clones into a folder called
# 'workspace' we have to use one of its environment
# variables to determine the project name.
if [[ "${ZUUL_SHORT_PROJECT_NAME:-none}" == "openstack-ansible-tests" ]] ||\
[[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
ln -s ${WORKING_DIR} ${WORKING_DIR}/tests/common
# In zuul v3 any dependent repository is placed into
# /home/zuul/src/git.openstack.org, so we check to see
# if there is a tests checkout there already. If so, we
# symlink that and use it.
elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then
ln -s "${ZUUL_TESTS_CLONE_LOCATION}" ${WORKING_DIR}/tests/common
# Otherwise we're clearly not in zuul or using a previously setup
# repo in some way, so just clone it from upstream.
else
git clone \
git clone -b stable/pike \
https://git.openstack.org/openstack/openstack-ansible-tests \
${WORKING_DIR}/tests/common
fi

22
tox.ini
View File

@ -7,7 +7,7 @@ envlist = docs,linters,functional
[testenv]
usedevelop = True
install_command =
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
deps =
-r{toxinidir}/test-requirements.txt
commands =
@ -53,16 +53,9 @@ commands =
{posargs}
[testenv:tests_clone]
commands =
bash -c "if [ ! -d "{toxinidir}/tests/common" ]; then \
git clone https://git.openstack.org/openstack/openstack-ansible-tests {toxinidir}/tests/common; \
fi"
[testenv:pep8]
commands =
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/tests-repo-clone.sh"
bash -c "{toxinidir}/tests/common/test-pep8.sh"
@ -76,21 +69,22 @@ ignore=F403,H303
[testenv:bashate]
commands =
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/tests-repo-clone.sh"
bash -c "{toxinidir}/tests/common/test-bashate.sh"
[testenv:ansible]
deps =
{[testenv]deps}
-rhttps://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt
-rhttps://git.openstack.org/cgit/openstack/openstack-ansible/plain/global-requirement-pins.txt?h=stable/pike
-rhttps://git.openstack.org/cgit/openstack/openstack-ansible-tests/plain/test-ansible-deps.txt?h=stable/pike
[testenv:ansible-syntax]
deps =
{[testenv:ansible]deps}
commands =
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/tests-repo-clone.sh"
bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
@ -98,7 +92,7 @@ commands =
deps =
{[testenv:ansible]deps}
commands =
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/tests-repo-clone.sh"
bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
@ -106,7 +100,7 @@ commands =
deps =
{[testenv:ansible]deps}
commands =
{[testenv:tests_clone]commands}
bash -c "{toxinidir}/tests/tests-repo-clone.sh"
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"