Import legacy-dg-hooks-dsvm job

This job is used only by devstack-gate, import it.

Rename it to devstack-gate-hooks following our naming policy.

Change-Id: Id01d7cda5cb28b6371bdcf8b85208135caa9e9b1
This commit is contained in:
Andreas Jaeger 2018-08-25 18:43:06 +02:00
parent 6617a03c64
commit bec430ebc7
3 changed files with 76 additions and 0 deletions

View File

@ -4,6 +4,14 @@
- name: primary
label: ubuntu-xenial
- job:
name: devstack-gate-hooks
parent: legacy-dsvm-base
run: playbooks/devstack-gate-hooks/run.yaml
post-run: playbooks/devstack-gate-hooks/post.yaml
timeout: 3900
- project:
check:
jobs:
@ -21,3 +29,4 @@
voting: false
- neutron-tempest-plugin-api:
voting: false
- devstack-gate-hooks

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-dg-hooks-dsvm from old job gate-dg-hooks-dsvm
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
# place calls for all hooks in here
function pre_test_hook {
echo "I am totally an awesome pre_test_hook"
}
export -f pre_test_hook
function gate_hook {
echo "I am totally an awesome gate_hook"
}
export -f gate_hook
function post_test_hook {
echo "I am totally an awesome post_test_hook"
}
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 }}'