manila/playbooks/legacy/manila-tempest-dsvm-generic.../run.yaml

106 lines
4.0 KiB
YAML

- hosts: all
name: Autoconverted job legacy-manila-tempest-dsvm-generic-scenario-custom-image
from old job gate-manila-tempest-dsvm-generic-scenario-custom-image-ubuntu-xenial-nv
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
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_GATE_POSTGRES=0
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
# Install manila-image-elements project for building custom image
export PROJECTS="openstack/manila-image-elements $PROJECTS"
export ENABLED_SERVICES=tempest
# 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 {
current_dir=$(pwd)
# Go to 'manila-image-elements' dir, build image and get its name
cd /opt/stack/new/manila-image-elements
./tools/gate/build-images generic_with_custom_image
image_name=$(cat ./IMAGE_NAME)
export MANILA_SERVICE_IMAGE_URL="file://$(pwd)/$image_name"
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
# Return back to execution dir
cd $current_dir
# '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 \
1 \
generic_with_custom_image \
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 \
generic_with_custom_image \
scenario \
0
}
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 }}'