Move legacy jobs to project

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

Move jobs to Cyborg repo

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

Change-Id: I31d5d7aed511aca18c1096b9f5eb7572f683d613
Needed-By: If816cfec5ace8f9fd7293c0749948d2c0dcb817a
Needed-By: I40e9380d049f541bf34488a3010d95f4a6835179
This commit is contained in:
Duong Ha-Quang 2017-10-11 08:05:54 +07:00 committed by Andreas Jaeger
parent 3d0655a179
commit a2fb9b4f42
3 changed files with 86 additions and 0 deletions

17
.zuul.yaml Normal file
View File

@ -0,0 +1,17 @@
- project:
name: openstack/cyborg
check:
jobs:
- cyborg-devstack
- job:
name: cyborg-devstack
parent: legacy-dsvm-base
run: playbooks/legacy/cyborg-devstack/run.yaml
post-run: playbooks/legacy/cyborg-devstack/post.yaml
timeout: 4200
voting: false
required-projects:
- openstack-dev/devstack
- openstack-infra/devstack-gate
- openstack/cyborg

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,54 @@
- hosts: all
name: Autoconverted job legacy-cyborg-devstack from old job gate-cyborg-devstack-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
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin cyborg git://git.openstack.org/openstack/cyborg
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PROJECTS="openstack/cyborg $PROJECTS"
export BRANCH_OVERRIDE=default
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
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 }}'