Run tempest jobs under python3

Add py2 dummy jobs to keep some python 2 coverage through the
Train release, but convert all the other tempest jobs to python 3.

Change-Id: Ia5fd26c30c6aaeb97ae1b524c5fd58b890fdb054
This commit is contained in:
Tom Barron 2019-07-16 09:18:04 -04:00
parent 0ed8c74dc4
commit cbe7056832
11 changed files with 134 additions and 10 deletions

View File

@ -28,6 +28,8 @@
- manila-tempest-minimal-dsvm-cephfs-nfs:
voting: false
- manila-tempest-minimal-dsvm-dummy
# Through the Train release we need to keep some python2 coverage.
- manila-tempest-minimal-dsvm-dummy-py2
- manila-tempest-minimal-dsvm-lvm
- manila-grenade:
voting: false
@ -321,6 +323,18 @@
- openstack/python-manilaclient
- openstack/tempest
- job:
name: manila-tempest-minimal-dsvm-dummy-py2
parent: manila-tempest-base
run: playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/run.yaml
post-run: playbooks/legacy/manila-tempest-minimal-dsvm-dummy-py2/post.yaml
required-projects:
- openstack/devstack-gate
- openstack/manila
- openstack/manila-tempest-plugin
- openstack/python-manilaclient
- openstack/tempest
- job:
name: manila-tempest-minimal-dsvm-lvm
parent: manila-tempest-base

View File

@ -30,7 +30,7 @@
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
@ -51,6 +51,8 @@
export KEEP_LOCALRC=1
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=True
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -30,7 +30,7 @@
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
@ -51,6 +51,8 @@
export KEEP_LOCALRC=1
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=True
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -30,7 +30,7 @@
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
@ -51,6 +51,8 @@
export KEEP_LOCALRC=1
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=True
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -30,7 +30,7 @@
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
@ -51,6 +51,8 @@
export KEEP_LOCALRC=1
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=True
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -30,7 +30,7 @@
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
@ -51,6 +51,8 @@
export KEEP_LOCALRC=1
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=True
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -30,7 +30,7 @@
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
@ -51,6 +51,8 @@
export KEEP_LOCALRC=1
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=True
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -0,0 +1,15 @@
- 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=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -0,0 +1,81 @@
- hosts: all
name: Autoconverted job manila-tempest-minimal-dsvm-dummy-py2 from old job gate-manila-tempest-minimal-dsvm-dummy-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
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
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_NEUTRON=1
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Basic services needed for minimal job
export OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest,tls-proxy
# Keep localrc to be able to set some vars in pre_test_hook
export KEEP_LOCALRC=1
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.
# 'driver' - codename of a share driver to configure.
# 'back_end_type' - defines which installation Manila should
# have - either 'singlebackend' or 'multibackend'.
source $BASE/new/manila/contrib/ci/pre_test_hook.sh False dummy multibackend
}
export -f pre_test_hook
function post_test_hook {
# 'back_end_type' - defines which installation Manila is
# configured to - either 'singlebackend' or 'multibackend'.
# 'driver' - codename of a share driver that is configured in
# Manila. It is used for enabling/disabling tests that are not
# supported by share driver that is used.
# 'test_type' - defines which set of test suites should be used,
# can have 'api' and 'scenario' values.
# 'postgres_enabled' - set of test suites depends on DB backend
# in some cases, so it is provided explicitely. Boolean-like.
source $BASE/new/manila/contrib/ci/post_test_hook.sh multibackend dummy api False
}
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

@ -30,7 +30,7 @@
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
@ -46,13 +46,12 @@
# Basic services needed for minimal job
export OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest,tls-proxy
export DEVSTACK_GATE_USE_PYTHON3=True
export PYTHON3_VERSION="3.6"
# Keep localrc to be able to set some vars in pre_test_hook
export KEEP_LOCALRC=1
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=True
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.

View File

@ -31,6 +31,7 @@
[[local|localrc]]
SKIP_EPEL_INSTALL=True
enable_plugin manila https://opendev.org/openstack/manila
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
enable_plugin neutron-dynamic-routing https://opendev.org/openstack/neutron-dynamic-routing
enable_plugin neutron-tempest-plugin https://opendev.org/openstack/neutron-tempest-plugin
EOF
@ -72,6 +73,8 @@
export PROJECTS="openstack/neutron-dynamic-routing $PROJECTS"
export PROJECTS="openstack/neutron-tempest-plugin $PROJECTS"
export DEVSTACK_GATE_USE_PYTHON3=True
function pre_test_hook {
# 'dhss' - acronym for 'Driver Handles Share Servers',
# defines mode of a share driver. Boolean-like.