Migrate to zuulv3 - move legacy jobs to project

This patch do step 1 in the docs: Move Legacy Jobs to Projects.

Change-Id: I22b4422104131f7e475c1c8ba1e7d69ec4f278b1
Needed-By: Ia59004029a44ad5109b15186b9cfa131ff519026
Needed-By: I87b55c19eae06553b21c89c06614dda341680248
This commit is contained in:
Tovin Seven 2017-10-13 16:13:38 +07:00
parent 3fd76ff13c
commit 5c68eec80c
3 changed files with 88 additions and 0 deletions

21
.zuul.yaml Normal file
View File

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

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: primary
name: Autoconverted job legacy-oslo.versionedobjects-src-grenade-dsvm-multinode
from old job gate-oslo.versionedobjects-src-grenade-dsvm-multinode-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_GATE_TOPOLOGY="multinode"
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 }}'