Merge "Migrate to Zuulv3"

This commit is contained in:
Zuul 2017-10-18 10:40:57 +00:00 committed by Gerrit Code Review
commit 3a3f4535b9
4 changed files with 115 additions and 2 deletions

23
.zuul.yaml Normal file
View File

@ -0,0 +1,23 @@
- job:
name: zunclient-devstack-docker-sql
parent: legacy-dsvm-base
run: playbooks/zunclient-devstack-docker-sql/run
post-run: playbooks/zunclient-devstack-docker-sql/post
timeout: 4200
required-projects:
- openstack-dev/devstack
- openstack-infra/devstack-gate
- openstack/devstack-plugin-container
- openstack/kuryr-libnetwork
- openstack/python-zunclient
- openstack/zun
- project:
name: openstack/python-zunclient
check:
jobs:
- zunclient-devstack-docker-sql
gate:
jobs:
- zunclient-devstack-docker-sql

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,75 @@
- hosts: all
name: Job zunclient-devstack-docker-sql
tasks:
- name: Ensure 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 zun git://git.openstack.org/openstack/zun
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_NEUTRON=1
# Enable tempest for tempest plugin
export ENABLED_SERVICES=tempest
export PROJECTS="openstack/zun $PROJECTS"
export PROJECTS="openstack/python-zunclient $PROJECTS"
export PROJECTS="openstack/kuryr-libnetwork $PROJECTS"
export PROJECTS="openstack/devstack-plugin-container $PROJECTS"
# Keep localrc to be able to set some vars in post_test_hook
export KEEP_LOCALRC=1
function gate_hook {
cd /opt/stack/new/zun/
./zun/tests/contrib/gate_hook.sh docker sql
}
export -f gate_hook
function post_test_hook {
source $BASE/new/devstack/accrc/admin/admin
cd /opt/stack/new/python-zunclient/
./zunclient/tests/functional/hooks/post_test_hook.sh docker
}
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 }}'

View File

@ -46,7 +46,7 @@ echo "Running OSC commands test for Zun"
export ZUNCLIENT_DIR="$BASE/new/python-zunclient"
sudo chown -R jenkins:stack $ZUNCLIENT_DIR
sudo chown -R $USER:stack $ZUNCLIENT_DIR
# Go to the zunclient dir
cd $ZUNCLIENT_DIR
@ -54,7 +54,7 @@ cd $ZUNCLIENT_DIR
# Run tests
set +e
source $BASE/new/devstack/openrc admin admin
sudo -E -H -u jenkins ./tools/run_functional.sh
sudo -E -H -u $USER ./tools/run_functional.sh
EXIT_CODE=$?