Add osc-placement-dsvm-functional-py3 job

This adds a py3 variant of the functional dsvm job.
This still uses devstack-gate (not native zuulv3) because
I'm not yet cool enough to know how to do native zuulv3 things.

Swift has to be disabled since it doesn't support py3 (this is
something all other py3 jobs are doing right now too).

Change-Id: I9a0074d9658eab76b7c73b820f498d61b89545e7
This commit is contained in:
Matt Riedemann 2018-02-25 07:24:59 -05:00
parent 2e8b471759
commit c9de308d00
3 changed files with 157 additions and 0 deletions

View File

@ -8,10 +8,25 @@
- openstack-infra/devstack-gate
- openstack/osc-placement
- job:
name: osc-placement-dsvm-functional-py3
parent: legacy-dsvm-base
description: |
Runs the osc-placement functional tests in a python 3 devstack
environment.
run: playbooks/legacy/osc-placement-dsvm-functional-py3/run.yaml
post-run: playbooks/legacy/osc-placement-dsvm-functional-py3/post.yaml
timeout: 7200
required-projects:
- openstack-infra/devstack-gate
- openstack/osc-placement
- project:
check:
jobs:
- osc-placement-dsvm-functional
- osc-placement-dsvm-functional-py3
gate:
jobs:
- osc-placement-dsvm-functional
- osc-placement-dsvm-functional-py3

View File

@ -0,0 +1,81 @@
- hosts: primary
tasks:
# TODO(mriedem): Need to cleanup these 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

@ -0,0 +1,61 @@
- hosts: all
name: osc-placement-dsvm-functional-py3
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]]
# swift is not ready for python3 yet
disable_service s-account
disable_service s-container
disable_service s-object
disable_service s-proxy
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_PROJECT_FROM_GIT=osc-placement
export DEVSTACK_GATE_USE_PYTHON3=True
function post_test_hook {
# Configure and run functional tests
$BASE/new/osc-placement/osc_placement/tests/functional/hooks/post_test_hook.sh
}
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 }}'