Migrate to Zuul v3

Migrate all functional jobs and gate to zuul v3.

Needed-By: I0b17cb8c9831d4e9f302a05b1ef3f3244a64a96b
Needed-By: I34b091ca5ce658fe34cd3800585421c9180cde25
Change-Id: Ia070c067f4f27bbf0a29f981777aa8de8c878a15
This commit is contained in:
rajat29 2017-11-22 15:13:09 +05:30
parent d75ff38dda
commit a7e47a4241
3 changed files with 104 additions and 0 deletions

22
.zuul.yaml Normal file
View File

@ -0,0 +1,22 @@
- job:
name: blazar-devstack-dsvm
parent: legacy-dsvm-base
run: playbooks/legacy/blazar-devstack-dsvm/run.yaml
post-run: playbooks/legacy/blazar-devstack-dsvm/post.yaml
timeout: 4200
required-projects:
- openstack-dev/devstack
- openstack-infra/devstack-gate
- openstack/blazar
- openstack/blazar-nova
- openstack/python-blazarclient
- project:
name: openstack/blazar
check:
jobs:
- blazar-devstack-dsvm
gate:
jobs:
- blazar-devstack-dsvm

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,67 @@
- hosts: all
name: Autoconverted job legacy-blazar-devstack-dsvm from old job gate-blazar-devstack-dsvm
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]]
enable_plugin blazar git://git.openstack.org/openstack/blazar
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=1
export ENABLED_SERVICES=blazar,blazar-a,blazar-m,tempest
export PROJECTS="openstack/blazar $PROJECTS"
export PROJECTS="openstack/blazar-nova $PROJECTS"
export PROJECTS="openstack/python-blazarclient $PROJECTS"
# Construct a regex to limiting scope of tempest
r="^(?:tempest\.cli\.simple_read_only\.test_.*reservation.*)"
r="$r|^(?:tempest\.scenario\.test_.*reservation.*)"
export DEVSTACK_GATE_TEMPEST_REGEX="$r"
function pre_test_hook {
# Install blazar tempest integration
BLAZAR_TEMPEST_DIR=/opt/stack/new/blazar/contrib/tempest
# Copying Tempest test suites
# This will be removed once blazar tempest starts to use TempestPlugin
if [ -e $BLAZAR_TEMPEST_DIR ] ; then
TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/new/tempest}
cp -R $BLAZAR_TEMPEST_DIR/tempest/* $TEMPEST_DIR/tempest
fi
}
export -f pre_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 }}'