Migrate to Zuul v3

Migrate all functional jobs and gate to zuul v3.
We will have to migrate all other legacy jobs too later.
This patch do step 1 in the docs: Move Legacy Jobs to Projects.

Change-Id: Ic6d755d88cec2f1aa98e042f75fd674602aca8a9
This commit is contained in:
Nam Nguyen Hoai 2017-10-13 10:36:19 +07:00
parent b52e68acef
commit aff271666c
3 changed files with 86 additions and 0 deletions

21
.zuul.yaml Normal file
View File

@ -0,0 +1,21 @@
- job:
name: oslo.log-src-grenade-devstack
parent: legacy-dsvm-base
voting: false
irrelevant-files:
- ^(test-|)requirements.txt$
- ^setup.cfg$
post-run: playbooks/legacy/oslo.log-src-grenade-devstack/post
required-projects:
- openstack-dev/grenade
- openstack-infra/devstack-gate
- openstack/oslo.log
run: playbooks/legacy/oslo.log-src-grenade-devstack/run
timeout: 10800
- project:
name: openstack/oslo.log
check:
jobs:
- oslo.log-src-grenade-devstack

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,50 @@
- hosts: all
name: Autoconverted job legacy-oslo.log-src-grenade-dsvm from old job gate-oslo.log-src-grenade-dsvm-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 PROJECTS="openstack-dev/grenade $PROJECTS"
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_GRENADE=pullup
export BRANCH_OVERRIDE=default
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
export DEVSTACK_PROJECT_FROM_GIT=$ZUUL_SHORT_PROJECT_NAME
# Even if the branch is overridden, make sure we use
# the correct branch using the OVERRIDE_*_PROJECT_BRANCH
# variable.
uc_project=`echo $DEVSTACK_PROJECT_FROM_GIT | tr [:lower:] [:upper:] | tr '-' '_' | sed 's/[^A-Z_]//'`
export "OVERRIDE_"$uc_project"_PROJECT_BRANCH"=$ZUUL_BRANCH
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 }}'