Merge "Migrate functional tests job to the zuul v3 syntax"
This commit is contained in:
commit
d86582f04d
24
.zuul.yaml
24
.zuul.yaml
@ -9,7 +9,7 @@
|
|||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- neutron-vpnaas-dsvm-functional-sswan
|
- neutron-vpnaas-functional-sswan
|
||||||
- neutron-tempest-plugin-vpnaas
|
- neutron-tempest-plugin-vpnaas
|
||||||
- neutron-tempest-plugin-vpnaas-libreswan-centos:
|
- neutron-tempest-plugin-vpnaas-libreswan-centos:
|
||||||
# TODO(mlavalle) switch to voting when this job is moved to Centos
|
# TODO(mlavalle) switch to voting when this job is moved to Centos
|
||||||
@ -17,7 +17,7 @@
|
|||||||
voting: false
|
voting: false
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- neutron-vpnaas-dsvm-functional-sswan
|
- neutron-vpnaas-functional-sswan
|
||||||
- neutron-tempest-plugin-vpnaas
|
- neutron-tempest-plugin-vpnaas
|
||||||
# TODO(mlavalle) uncomment following line when the job is moved to
|
# TODO(mlavalle) uncomment following line when the job is moved to
|
||||||
# Centos 8
|
# Centos 8
|
||||||
@ -44,20 +44,12 @@
|
|||||||
skip_4in6_6in4_tests: true
|
skip_4in6_6in4_tests: true
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: neutron-vpnaas-dsvm-functional-sswan
|
name: neutron-vpnaas-functional-sswan
|
||||||
parent: legacy-dsvm-base
|
parent: neutron-functional
|
||||||
run: playbooks/legacy/neutron-vpnaas-dsvm-functional-sswan/run.yaml
|
pre-run: playbooks/configure_functional_job.yaml
|
||||||
post-run: playbooks/legacy/neutron-vpnaas-dsvm-functional-sswan/post.yaml
|
vars:
|
||||||
timeout: 7800
|
project_name: neutron-vpnaas
|
||||||
required-projects:
|
tox_envlist: dsvm-functional-sswan
|
||||||
- openstack/devstack-gate
|
|
||||||
- openstack/neutron
|
|
||||||
- openstack/neutron-vpnaas
|
|
||||||
irrelevant-files:
|
|
||||||
- ^.*\.rst$
|
|
||||||
- ^doc/.*$
|
|
||||||
- ^neutron_vpnaas/tests/unit/.*$
|
|
||||||
- ^releasenotes/.*$
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: neutron-vpnaas-rally
|
name: neutron-vpnaas-rally
|
||||||
|
4
playbooks/configure_functional_job.yaml
Normal file
4
playbooks/configure_functional_job.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- setup_logdir
|
||||||
|
- configure_functional_tests
|
@ -1,80 +0,0 @@
|
|||||||
- hosts: primary
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
|
||||||
synchronize:
|
|
||||||
src: '{{ ansible_user_dir }}/workspace/'
|
|
||||||
dest: '{{ zuul.executor.log_root }}'
|
|
||||||
mode: pull
|
|
||||||
copy_links: true
|
|
||||||
verify_host: true
|
|
||||||
rsync_opts:
|
|
||||||
- --include=**/*nose_results.html
|
|
||||||
- --include=*/
|
|
||||||
- --exclude=*
|
|
||||||
- --prune-empty-dirs
|
|
||||||
|
|
||||||
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
|
||||||
synchronize:
|
|
||||||
src: '{{ ansible_user_dir }}/workspace/'
|
|
||||||
dest: '{{ zuul.executor.log_root }}'
|
|
||||||
mode: pull
|
|
||||||
copy_links: true
|
|
||||||
verify_host: true
|
|
||||||
rsync_opts:
|
|
||||||
- --include=**/*testr_results.html.gz
|
|
||||||
- --include=*/
|
|
||||||
- --exclude=*
|
|
||||||
- --prune-empty-dirs
|
|
||||||
|
|
||||||
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
|
||||||
synchronize:
|
|
||||||
src: '{{ ansible_user_dir }}/workspace/'
|
|
||||||
dest: '{{ zuul.executor.log_root }}'
|
|
||||||
mode: pull
|
|
||||||
copy_links: true
|
|
||||||
verify_host: true
|
|
||||||
rsync_opts:
|
|
||||||
- --include=/.testrepository/tmp*
|
|
||||||
- --include=*/
|
|
||||||
- --exclude=*
|
|
||||||
- --prune-empty-dirs
|
|
||||||
|
|
||||||
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
|
||||||
synchronize:
|
|
||||||
src: '{{ ansible_user_dir }}/workspace/'
|
|
||||||
dest: '{{ zuul.executor.log_root }}'
|
|
||||||
mode: pull
|
|
||||||
copy_links: true
|
|
||||||
verify_host: true
|
|
||||||
rsync_opts:
|
|
||||||
- --include=**/*testrepository.subunit.gz
|
|
||||||
- --include=*/
|
|
||||||
- --exclude=*
|
|
||||||
- --prune-empty-dirs
|
|
||||||
|
|
||||||
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
|
||||||
synchronize:
|
|
||||||
src: '{{ ansible_user_dir }}/workspace/'
|
|
||||||
dest: '{{ zuul.executor.log_root }}/tox'
|
|
||||||
mode: pull
|
|
||||||
copy_links: true
|
|
||||||
verify_host: true
|
|
||||||
rsync_opts:
|
|
||||||
- --include=/.tox/*/log/*
|
|
||||||
- --include=*/
|
|
||||||
- --exclude=*
|
|
||||||
- --prune-empty-dirs
|
|
||||||
|
|
||||||
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
|
|
||||||
synchronize:
|
|
||||||
src: '{{ ansible_user_dir }}/workspace/'
|
|
||||||
dest: '{{ zuul.executor.log_root }}'
|
|
||||||
mode: pull
|
|
||||||
copy_links: true
|
|
||||||
verify_host: true
|
|
||||||
rsync_opts:
|
|
||||||
- --include=/logs/**
|
|
||||||
- --include=*/
|
|
||||||
- --exclude=*
|
|
||||||
- --prune-empty-dirs
|
|
@ -1,56 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
name: Autoconverted job legacy-neutron-vpnaas-dsvm-functional-sswan from old job
|
|
||||||
gate-neutron-vpnaas-dsvm-functional-sswan-ubuntu-xenial
|
|
||||||
tasks:
|
|
||||||
|
|
||||||
- name: Ensure legacy workspace directory
|
|
||||||
file:
|
|
||||||
path: '{{ ansible_user_dir }}/workspace'
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- shell:
|
|
||||||
cmd: |
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
cat > clonemap.yaml << EOF
|
|
||||||
clonemap:
|
|
||||||
- name: openstack/devstack-gate
|
|
||||||
dest: devstack-gate
|
|
||||||
EOF
|
|
||||||
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
|
|
||||||
https://opendev.org \
|
|
||||||
openstack/devstack-gate
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: '{{ ansible_user_dir }}/workspace'
|
|
||||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
||||||
|
|
||||||
- shell:
|
|
||||||
cmd: |
|
|
||||||
set -e
|
|
||||||
set -x
|
|
||||||
export PYTHONUNBUFFERED=true
|
|
||||||
export DEVSTACK_GATE_UNSTACK=1
|
|
||||||
export DEVSTACK_GATE_TEMPEST=0
|
|
||||||
export DEVSTACK_GATE_EXERCISES=0
|
|
||||||
export DEVSTACK_GATE_NEUTRON=1
|
|
||||||
export DEVSTACK_GATE_INSTALL_TESTONLY=1
|
|
||||||
export BRANCH_OVERRIDE=default
|
|
||||||
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
|
|
||||||
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
|
|
||||||
fi
|
|
||||||
|
|
||||||
function gate_hook {
|
|
||||||
bash -xe $BASE/new/neutron-vpnaas/neutron_vpnaas/tests/contrib/gate_hook.sh dsvm-functional-sswan
|
|
||||||
}
|
|
||||||
export -f gate_hook
|
|
||||||
|
|
||||||
function post_test_hook {
|
|
||||||
bash -xe $BASE/new/neutron-vpnaas/neutron_vpnaas/tests/contrib/post_test_hook.sh dsvm-functional-sswan
|
|
||||||
}
|
|
||||||
export -f post_test_hook
|
|
||||||
|
|
||||||
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
|
|
||||||
./safe-devstack-vm-gate-wrap.sh
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: '{{ ansible_user_dir }}/workspace'
|
|
||||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
24
roles/configure_functional_tests/README.rst
Normal file
24
roles/configure_functional_tests/README.rst
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
Configure host to run on it Neutron functional/fullstack tests
|
||||||
|
|
||||||
|
**Role Variables**
|
||||||
|
|
||||||
|
.. zuul:rolevar:: tests_venv
|
||||||
|
:default: {{ tox_envlist }}
|
||||||
|
|
||||||
|
.. zuul:rolevar:: project_name
|
||||||
|
:default: neutron
|
||||||
|
|
||||||
|
.. zuul:rolevar:: base_dir
|
||||||
|
:default: {{ ansible_user_dir }}/src/opendev.org
|
||||||
|
|
||||||
|
.. zuul:rolevar:: gate_dest_dir
|
||||||
|
:default: {{ base_dir }}/openstack
|
||||||
|
|
||||||
|
.. zuul:rolevar:: devstack_dir
|
||||||
|
:default: {{ base_dir }}/openstack/devstack
|
||||||
|
|
||||||
|
.. zuul:rolevar:: neutron_dir
|
||||||
|
:default: {{ gate_dest_dir }}/neutron
|
||||||
|
|
||||||
|
.. zuul:rolevar:: neutron_vpnaas_dir
|
||||||
|
:default: {{ gate_dest_dir }}/neutron-vpnaas
|
7
roles/configure_functional_tests/defaults/main.yaml
Normal file
7
roles/configure_functional_tests/defaults/main.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
tests_venv: "{{ tox_envlist }}"
|
||||||
|
project_name: "neutron"
|
||||||
|
base_dir: "{{ ansible_user_dir }}/src/opendev.org"
|
||||||
|
gate_dest_dir: "{{ base_dir }}/openstack"
|
||||||
|
devstack_dir: "{{ base_dir }}/openstack/devstack"
|
||||||
|
neutron_dir: "{{ gate_dest_dir }}/neutron"
|
||||||
|
neutron_vpnaas_dir: "{{ gate_dest_dir }}/neutron-vpnaas"
|
21
roles/configure_functional_tests/tasks/main.yaml
Normal file
21
roles/configure_functional_tests/tasks/main.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
- shell:
|
||||||
|
cmd: |
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
GATE_STACK_USER={{ ansible_user }}
|
||||||
|
IS_GATE=True
|
||||||
|
|
||||||
|
BASE_DIR={{ base_dir }}
|
||||||
|
GATE_DEST={{ gate_dest_dir }}
|
||||||
|
PROJECT_NAME={{ project_name }}
|
||||||
|
NEUTRON_PATH={{ neutron_dir }}
|
||||||
|
NEUTRON_VPNAAS_PATH={{ neutron_vpnaas_dir }}
|
||||||
|
DEVSTACK_PATH={{ devstack_dir }}
|
||||||
|
VENV={{ tests_venv }}
|
||||||
|
|
||||||
|
source $DEVSTACK_PATH/functions
|
||||||
|
source $NEUTRON_PATH/devstack/lib/ovs
|
||||||
|
source $NEUTRON_VPNAAS_PATH/tools/configure_for_vpn_func_testing.sh
|
||||||
|
|
||||||
|
configure_host_for_vpn_func_testing
|
||||||
|
executable: /bin/bash
|
3
tox.ini
3
tox.ini
@ -25,6 +25,7 @@ deps =
|
|||||||
-r{toxinidir}/neutron_vpnaas/tests/functional/requirements.txt
|
-r{toxinidir}/neutron_vpnaas/tests/functional/requirements.txt
|
||||||
setenv =
|
setenv =
|
||||||
OS_SUDO_TESTING=1
|
OS_SUDO_TESTING=1
|
||||||
|
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
|
||||||
OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
||||||
OS_ROOTWRAP_DAEMON_CMD=sudo {envdir}/bin/neutron-rootwrap-daemon {envdir}/etc/neutron/rootwrap.conf
|
OS_ROOTWRAP_DAEMON_CMD=sudo {envdir}/bin/neutron-rootwrap-daemon {envdir}/etc/neutron/rootwrap.conf
|
||||||
OS_FAIL_ON_MISSING_DEPS=1
|
OS_FAIL_ON_MISSING_DEPS=1
|
||||||
@ -50,7 +51,6 @@ setenv =
|
|||||||
OS_TEST_PATH=./neutron_vpnaas/tests/functional/openswan
|
OS_TEST_PATH=./neutron_vpnaas/tests/functional/openswan
|
||||||
{[testenv:functional]setenv}
|
{[testenv:functional]setenv}
|
||||||
deps = {[testenv:functional]deps}
|
deps = {[testenv:functional]deps}
|
||||||
sitepackages=True
|
|
||||||
whitelist_externals = {[testenv:functional]whitelist_externals}
|
whitelist_externals = {[testenv:functional]whitelist_externals}
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}
|
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}
|
||||||
@ -61,7 +61,6 @@ setenv =
|
|||||||
OS_TEST_PATH=./neutron_vpnaas/tests/functional/strongswan
|
OS_TEST_PATH=./neutron_vpnaas/tests/functional/strongswan
|
||||||
{[testenv:functional]setenv}
|
{[testenv:functional]setenv}
|
||||||
deps = {[testenv:functional]deps}
|
deps = {[testenv:functional]deps}
|
||||||
sitepackages=True
|
|
||||||
whitelist_externals = {[testenv:functional]whitelist_externals}
|
whitelist_externals = {[testenv:functional]whitelist_externals}
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}
|
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}
|
||||||
|
Loading…
Reference in New Issue
Block a user