Simplify template and its usage for gce and ec2 jobs

Use one template to make jobs for gce-api for both network services.

Change-Id: I8d0e6669c72cecab4347ae6bfac7ce3cf3e774a2
This commit is contained in:
Andrey Pavlov 2016-12-09 08:14:32 +03:00
parent 4932d332fc
commit cc932791ff
2 changed files with 14 additions and 59 deletions

View File

@ -1,5 +1,5 @@
- job-template:
name: '{pipeline}-functional-neutron-dsvm-gceapi-{node}{suffix}'
name: '{pipeline}-functional-{network}-dsvm-gceapi-{node}{suffix}'
node: '{node}'
wrappers:
@ -16,47 +16,6 @@
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_NOTESTS=1
export DEVSTACK_GATE_NEUTRON=1
export BRANCH_OVERRIDE={branch-override}
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
export PROJECTS="openstack/gce-api $PROJECTS"
export DEVSTACK_LOCAL_CONFIG="enable_plugin gce-api git://git.openstack.org/openstack/gce-api"
function post_test_hook {{
source $BASE/new/devstack/accrc/admin/admin
cd /opt/stack/new/gce-api/
./gceapi/tests/contrib/post_test_hook.sh
}}
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
publishers:
- devstack-logs
- console-log
- job-template:
name: '{pipeline}-functional-nova-network-dsvm-gceapi-{node}{suffix}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 125
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- shell: |
#!/bin/bash -xe
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_NOTESTS=1
export DEVSTACK_GATE_NEUTRON=0
export BRANCH_OVERRIDE={branch-override}
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
@ -64,6 +23,12 @@
export PROJECTS="openstack/gce-api $PROJECTS"
export DEVSTACK_LOCAL_CONFIG="enable_plugin gce-api git://git.openstack.org/openstack/gce-api"
if [ "{network}" = "neutron" ] ; then
export DEVSTACK_GATE_NEUTRON=1
else
export DEVSTACK_GATE_NEUTRON=0
fi
function post_test_hook {{
source $BASE/new/devstack/accrc/admin/admin
cd /opt/stack/new/gce-api/

View File

@ -4296,15 +4296,9 @@
- ubuntu-xenial
suffix: ''
branch-override: default
network: 'neutron'
- '{pipeline}-functional-{network}-dsvm-ec2api-{node}{suffix}':
pipeline: gate
node:
- ubuntu-trusty
- ubuntu-xenial
suffix: ''
branch-override: default
network: 'nova-network'
network:
- 'neutron'
- 'nova-network'
- 'ec2-api-functional-neutron-dsvm-full-{node}{suffix}':
node:
- ubuntu-trusty
@ -4911,20 +4905,16 @@
jobs:
- python-jobs
- pypi-jobs
- '{pipeline}-functional-neutron-dsvm-gceapi-{node}{suffix}':
pipeline: gate
node:
- ubuntu-trusty
- ubuntu-xenial
suffix: '-nv'
branch-override: default
- '{pipeline}-functional-nova-network-dsvm-gceapi-{node}{suffix}':
- '{pipeline}-functional-{network}-dsvm-gceapi-{node}{suffix}':
pipeline: gate
node:
- ubuntu-trusty
- ubuntu-xenial
suffix: '-nv'
branch-override: default
network:
- 'neutron'
- 'nova-network'
- project:
name: gear