Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Duong Ha-Quang authored and ajaeger committed Dec 29, 2017
1 parent 3d0655a commit a2fb9b4
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .zuul.yaml
@@ -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
15 changes: 15 additions & 0 deletions playbooks/legacy/cyborg-devstack/post.yaml
@@ -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
54 changes: 54 additions & 0 deletions playbooks/legacy/cyborg-devstack/run.yaml
@@ -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 }}'

0 comments on commit a2fb9b4

Please sign in to comment.