Zuul: port to native v3 job and add victoria unit tests
Port the functional job to the native Zuul v3 format, and remove a few old wrapper scripts which are not needed anymore (the tests can be run locally through `tox -efunctional` as well). Also, switch to the Victoria run time for unit tests. Co-Authored-By: Luigi Toscano <ltoscano@redhat.com> Change-Id: Ibce326044c240d6c4e7f1ca3c3ac50a18282a86d
This commit is contained in:
parent
72dedebbfa
commit
1f0feb30cc
16
.zuul.yaml
16
.zuul.yaml
@ -1,25 +1,25 @@
|
||||
- job:
|
||||
name: python-barbicanclient-dsvm
|
||||
parent: legacy-dsvm-base
|
||||
run: playbooks/python-barbicanclient-dsvm/run.yaml
|
||||
post-run: playbooks/python-barbicanclient-dsvm/post.yaml
|
||||
name: python-barbicanclient-tox-functional
|
||||
parent: devstack-tox-functional
|
||||
timeout: 4200
|
||||
required-projects:
|
||||
- openstack/devstack-gate
|
||||
- openstack/barbican
|
||||
- openstack/barbican-tempest-plugin
|
||||
- openstack/python-barbicanclient
|
||||
vars:
|
||||
devstack_plugins:
|
||||
barbican: https://opendev.org/openstack/barbican
|
||||
|
||||
- project:
|
||||
templates:
|
||||
- check-requirements
|
||||
- openstack-lower-constraints-jobs
|
||||
- openstack-python3-ussuri-jobs
|
||||
- openstack-python3-victoria-jobs
|
||||
- openstackclient-plugin-jobs
|
||||
- publish-openstack-docs-pti
|
||||
check:
|
||||
jobs:
|
||||
- python-barbicanclient-dsvm
|
||||
- python-barbicanclient-tox-functional
|
||||
gate:
|
||||
jobs:
|
||||
- python-barbicanclient-dsvm
|
||||
- python-barbicanclient-tox-functional
|
||||
|
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# This script is executed inside post_test_hook function in devstack gate.
|
||||
|
||||
# Install packages from test-requirements.txt
|
||||
sudo pip install -r /opt/stack/new/python-barbicanclient/test-requirements.txt
|
||||
|
||||
# Make sure we're running the trunk client before we run the tests
|
||||
sudo pip install -U /opt/stack/new/python-barbicanclient
|
||||
|
||||
cd /opt/stack/new/python-barbicanclient/functionaltests
|
||||
sudo ./run_tests.sh
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# Install test-requirements
|
||||
pip install -r /opt/stack/new/python-barbicanclient/test-requirements.txt
|
||||
|
||||
echo "Running functional tests on $(python -V)"
|
||||
|
||||
nosetests -v .
|
@ -1,15 +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=/logs/**
|
||||
- --include=*/
|
||||
- --exclude=*
|
||||
- --prune-empty-dirs
|
@ -1,64 +0,0 @@
|
||||
- hosts: all
|
||||
name: Autoconverted job legacy-python-barbicanclient-dsvm from old job gate-python-barbicanclient-dsvm-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 barbican https://opendev.org/openstack/barbican
|
||||
|
||||
EOF
|
||||
executable: /bin/bash
|
||||
chdir: '{{ ansible_user_dir }}/workspace'
|
||||
environment: '{{ zuul | zuul_legacy_vars }}'
|
||||
|
||||
- shell:
|
||||
cmd: |
|
||||
set -e
|
||||
set -x
|
||||
export PYTHONUNBUFFERED=true
|
||||
export OVERRIDE_ENABLED_SERVICES=tempest,rabbit,mysql,key
|
||||
export PROJECTS="openstack/barbican $PROJECTS"
|
||||
export PROJECTS="openstack/python-barbicanclient $PROJECTS"
|
||||
export PROJECTS="openstack/barbican-tempest-plugin $PROJECTS"
|
||||
|
||||
function gate_hook {
|
||||
$BASE/new/barbican/devstack/gate_hook.sh
|
||||
}
|
||||
export -f gate_hook
|
||||
|
||||
function post_test_hook {
|
||||
cd /opt/stack/new/python-barbicanclient/functionaltests
|
||||
./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 }}'
|
Loading…
Reference in New Issue
Block a user