Merge "Migrate fullstack job definition to zuulv3 syntax"

This commit is contained in:
Zuul 2019-03-19 18:52:18 +00:00 committed by Gerrit Code Review
commit d03c460ae5
9 changed files with 14 additions and 373 deletions

View File

@ -145,19 +145,14 @@
- job:
name: neutron-fullstack
parent: legacy-dsvm-base
run: playbooks/legacy/neutron-fullstack/run.yaml
post-run: playbooks/legacy/neutron-fullstack/post.yaml
timeout: 7800
required-projects:
- openstack-infra/devstack-gate
- openstack/neutron
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^neutron/locale/.*$
- ^releasenotes/.*$
parent: neutron-functional
vars:
tox_envlist: dsvm-fullstack
zuul_copy_output:
# We need to copy directory with logs to have it in job artifacts also,
# /opt/stack/logs is default logs directory defined in neutron's
# tox.ini file
'{{ devstack_base_dir }}/logs/dsvm-fullstack-logs': logs
- job:
name: neutron-rally-task
@ -415,18 +410,10 @@
- job:
name: neutron-fullstack-with-uwsgi
parent: legacy-dsvm-base
run: playbooks/legacy/neutron-fullstack-with-uwsgi/run.yaml
post-run: playbooks/legacy/neutron-fullstack-with-uwsgi/post.yaml
timeout: 7800
required-projects:
- openstack-infra/devstack-gate
- openstack/neutron
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^neutron/locale/.*$
- ^releasenotes/.*$
parent: neutron-fullstack
vars:
devstack_localrc:
NEUTRON_DEPLOY_MOD_WSGI: true
voting: false
- job:

View File

@ -2,7 +2,7 @@
set -ex
VENV=${1:-"dsvm-fullstack"}
VENV=${1:-"api"}
FLAVOR=${2:-"all"}
GATE_DEST=$BASE/new
@ -55,42 +55,6 @@ function load_rc_for_rally {
case $VENV in
"dsvm-fullstack")
# The following need to be set before sourcing
# configure_for_func_testing.
GATE_STACK_USER=stack
PROJECT_NAME=neutron
IS_GATE=True
LOCAL_CONF=$DEVSTACK_PATH/local.conf
source $DEVSTACK_PATH/functions
source $NEUTRON_PATH/devstack/lib/ovs
source $NEUTRON_PATH/tools/configure_for_func_testing.sh
configure_host_for_func_testing
# Because of bug present in current Ubuntu Xenial kernel version
# we need a fix for VXLAN local tunneling.
if [[ "$VENV" =~ "dsvm-fullstack" ]]; then
if is_ubuntu && [ ${DISTRO} == "xenial" ]; then
# The OVS_BRANCH variable is used by git checkout. In the case below,
# we use openvswitch release 2.9.3 that contains a fix for usage of
# VXLAN tunnels on a single node (ovs repository commit
# 741f47cf35df2bfc7811b2cff75c9bb8d05fd26f). This can be dropped once
# we switch to Ubuntu Bionic nodes, where kernel has the fix
OVS_BRANCH="v2.9.3"
compile_ovs_kernel_module
fi
fi
# prepare base environment for ./stack.sh
load_rc_hook stack_base
# enable monitoring
load_rc_hook dstat
;;
"api"|"api-pecan"|"full-pecan"|"dsvm-scenario-ovs")
# TODO(ihrachys) consider feeding result of ext-list into tempest.conf
load_rc_hook api_all_extensions

View File

@ -1 +0,0 @@
enable_service dstat

View File

@ -1,8 +0,0 @@
# set password, otherwise devstack enters interactive mode and fails
ADMIN_PASSWORD=secretadmin
# don't use screen to start services (needed to disable colorization in
# captured service logs)
USE_SCREEN=False
# start with an empty service list, otherwise devstack will configure several
# 'default' services, including rabbitmq and mysql
disable_all_services

View File

@ -27,9 +27,6 @@ function generate_log_index {
# honor job flavors like -python35
case $venv in
*"dsvm-fullstack"*)
venv="dsvm-fullstack"
;;
*"dsvm-functional"*)
venv="dsvm-functional"
;;
@ -52,7 +49,7 @@ function generate_log_index {
$xtrace
}
if [[ "$venv" == dsvm-functional* ]] || [[ "$venv" == dsvm-fullstack* ]]; then
if [[ "$venv" == dsvm-functional* ]]; then
owner=stack
sudo_env=

View File

@ -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

View File

@ -1,67 +0,0 @@
- hosts: all
name: This is a Neutron Fullstack test suite running with uwsgi
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-infra/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.openstack.org \
openstack-infra/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
NEUTRON_DEPLOY_MOD_WSGI=True
EOF
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_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/neutron/tests/contrib/gate_hook.sh dsvm-fullstack
}
export -f gate_hook
function post_test_hook {
bash -xe $BASE/new/neutron/neutron/tests/contrib/post_test_hook.sh dsvm-fullstack
}
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 }}'

View File

@ -1,96 +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
# TODO(slaweq): this should be moved to separate role and used in zuulv3
# jobs definitions also
- name: Store journal logs in {{ ansible_user_dir }}/workspace/logs/journal.log
become: yes
shell:
cmd: |
/bin/journalctl -a > {{ ansible_user_dir }}/workspace/logs/journal.log
- name: Set journal.log file permissions
become: yes
file:
path: '{{ ansible_user_dir }}/workspace/logs/journal.log'
owner: '{{ ansible_user }}'
group: '{{ ansible_user }}'
mode: 0644
- 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

View File

@ -1,55 +0,0 @@
- hosts: all
name: Autoconverted job legacy-neutron-dsvm-fullstack from old job gate-neutron-dsvm-fullstack-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-infra/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.openstack.org \
openstack-infra/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export USE_PYTHON3=true
export PYTHONUNBUFFERED=true
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/neutron/tests/contrib/gate_hook.sh dsvm-fullstack
}
export -f gate_hook
function post_test_hook {
bash -xe $BASE/new/neutron/neutron/tests/contrib/post_test_hook.sh dsvm-fullstack
}
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 }}'