Move legacy jobs to project

This patch implements first step in zuulv3 migration guide [1]:

Move jobs to mixmatch repo

[1] https://docs.openstack.org/infra/manual/zuulv3.html#legacy-job-migration-details

Change-Id: I6d97b4ec8f4c22785a1081dc711257c071637999
This commit is contained in:
Duong Ha-Quang 2017-10-13 15:12:46 +07:00 committed by Jeremy Freudberg
parent 270f46e66b
commit 23d5c2df9e
4 changed files with 86 additions and 2 deletions

17
.zuul.yaml Normal file
View File

@ -0,0 +1,17 @@
- project:
name: openstack/mixmatch
check:
jobs:
- mixmatch-dsvm-functional:
voting: false
- job:
name: mixmatch-dsvm-functional
parent: legacy-dsvm-base
run: playbooks/legacy/mixmatch-dsvm-functional/run
post-run: playbooks/legacy/mixmatch-dsvm-functional/post
timeout: 7800
required-projects:
- openstack-infra/devstack-gate
- openstack/mixmatch

View File

@ -35,8 +35,8 @@ if [ -d .testrepository ]; then
sudo rm -r .testrepository
fi
sudo chown -R jenkins:stack $BASE/new/tempest
sudo chown -R jenkins:stack /opt/stack/data/tempest
sudo chown -R $USER:stack $BASE/new/tempest
sudo chown -R $USER:stack /opt/stack/data/tempest
ostestr -r '(^tempest.api.compute|^tempest.api.image|^tempest.api.volume|^tempest.api.network|^tempest.scenario)' \
--blacklist-file $BASE/new/mixmatch/mixmatch/tests/functional/tempest_blacklist.txt

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,52 @@
- hosts: all
name: Autoconverted job legacy-mixmatch-dsvm-functional from old job gate-mixmatch-dsvm-functional-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-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
export PYTHONUNBUFFERED=true
export BRANCH_OVERRIDE=default
export PROJECTS="openstack/mixmatch $PROJECTS"
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
export DEVSTACK_LOCAL_CONFIG="enable_plugin mixmatch git://git.openstack.org/openstack/mixmatch"
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_NOTESTS=1
function post_test_hook {
# Configure and run functional tests
$BASE/new/mixmatch/mixmatch/tests/functional/hooks/dsvm_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 }}'