Skip to content

Commit

Permalink
Migrate jobs to zuulv3
Browse files Browse the repository at this point in the history
Change-Id: I1840cda6b6d8a057c8b0d04e26d3a42f56dd7948
Depends-On: http://gerrit.an.nuagenetworks.net:8080/61
(cherry picked from commit 55a56e1)
  • Loading branch information
gridinv committed Nov 6, 2019
1 parent 1f37fb2 commit 466a438
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 148 deletions.
103 changes: 73 additions & 30 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,86 @@
check:
jobs:
- openstack-tox-pep8
- legacy-tempest-aio-client:
required-projects:
- OpenStack/nuage-openstack-neutron
irrelevant-files:
- ^(test-|)requirements.txt$
- ^.*\.rst$
- ^doc/.*$
- ^setup.cfg$
- ^tox.ini$
- nuage-neutronclient-osc-tests-functional
- nuage-neutronclient-cli
- nuage-neutronclient-functional
gate:
jobs:
- openstack-tox-pep8
- legacy-tempest-aio-client:
required-projects:
- OpenStack/nuage-openstack-neutron
irrelevant-files:
- ^(test-|)requirements.txt$
- ^.*\.rst$
- ^doc/.*$
- ^setup.cfg$
- ^tox.ini$
- nuage-neutronclient-osc-tests-functional
- nuage-neutronclient-cli
- nuage-neutronclient-functional
periodic:
jobs:
- nuage-neutronclient-osc-tests-functional
- nuage-neutronclient-functional

- job:
name: nuage-neutronclient-osc-tests-functional
parent: legacy-dsvm-base
run: playbooks/run.yaml
post-run: playbooks/post.yaml
timeout: 9000
name: nuage-neutronclient-cli
parent: networking-nuage-base
nodeset: openstack-single-node-rhel7
vars:
tempest_test_regex: '^nuage_tempest_plugin\.tests\.api\.cli\..*'

- job:
name: nuage-neutronclient-functional
parent: devstack-tox-functional
nodeset: openstack-single-node-rhel7
irrelevant-files:
- ^(test-|)requirements.txt$
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
- ^setup.cfg$
- ^tools/.*$
- ^tox.ini$
required-projects:
- OpenStack/networking-testsriov
- OpenStack/nuage-openstack-neutron
- OpenStack/nuage-openstack-neutronclient
- openstack/devstack-gate
- openstack/neutron
- openstack/python-openstackclient
- openstack/placement
- opendev.org/openstack/neutron
- opendev.org/openstack/python-openstackclient
- opendev.org/openstack/placement
run: playbooks/run.yaml
vars:
nuage_fip_range: "172.{{ 255 | random }}.{{ 255 | random }}"
vsp_release: "{{ nuage_vsp_release }}"
tox_envlist: functional
devstack_services:
tls-proxy: false
q-svc: true
c-bak: false
etcd: false
q-agt: false
q-dhcp: false
q-l3: false
q-meta: false
q-metering: false
s-account: false
s-container-sync: false
s-container: false
s-object: false
s-proxy: false
devstack_localrc:
USE_PYTHON3: false
LIBS_FROM_GIT: python-openstackclient
LIBVIRT_TYPE: kvm
IMAGE_URLS: "{{ image_url }}"
DEFAULT_IMAGE_FILE_NAME: cirros-ipv6.qcow2
DOWNLOAD_DEFAULT_IMAGES: False
FLOATING_RANGE: "{{ nuage_fip_range }}.0/24"
PUBLIC_NETWORK_GATEWAY: "{{ nuage_fip_range }}.1"
Q_PLUGIN: ml2
Q_USE_PROVIDERNET_FOR_PUBLIC: False
Q_ML2_PLUGIN_EXT_DRIVERS: nuage_subnet,nuage_port,port_security,nuage_network
Q_ML2_PLUGIN_TYPE_DRIVERS: vxlan,vlan,flat
Q_ML2_PLUGIN_MECHANISM_DRIVERS: nuage,nuage_baremetal,nuage_sriov,testsriov
PHYSICAL_NETWORK: physnet1,physnet2
ML2_VLAN_RANGES: physnet1:100:300,physnet2:100:300
NUAGE_VSD_DEF_NETPART_NAME: "NuageCi-{{ 1000000 | random }}"
NUAGE_FIP_UNDERLAY: True
NUAGE_USE_METADATA: True
NUAGE_METADATA_SHARED_SECRET: sharedsecret
NUAGE_PAT: legacy_disabled
OVS_BRIDGE: alubr0
devstack_plugins:
nuage-openstack-neutron: https://github.com/nuagenetworks/nuage-openstack-neutron.git
nuage-openstack-neutronclient: https://github.com/nuagenetworks/nuage-openstack-neutronclient.git
networking-testsriov: https://github.com/nuagenetworks/networking-testsriov.git
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def test_list_show_switchport_binding(self):
port_id=self.gw_port_name, switch_info=self.name)

network_name = utils.get_random_name()
self.openstack('network create --mtu 1450 --provider-network-type vlan'
self.openstack('network create --mtu 1400 --provider-network-type vlan'
' --provider-physical-network physnet1'
' --provider-segment {vlan} {network}'
.format(vlan=vlan, network=network_name))
Expand Down
29 changes: 0 additions & 29 deletions playbooks/post.yaml

This file was deleted.

128 changes: 40 additions & 88 deletions playbooks/run.yaml
Original file line number Diff line number Diff line change
@@ -1,90 +1,42 @@
- hosts: all
name: python-openstackclient functional tests
- hosts: localhost
vars:
no_proxy: "{{ proxy_env['no_proxy'] }}"
tasks:
- name: compute no_proxy
block:
- set_fact:
no_proxy: "{{ no_proxy }},{{ hostvars[item]['nodepool']['interface_ip'] }}"
when: hostvars[item]['nodepool']['interface_ip'] is defined
with_items: "{{ query('inventory_hostnames', 'all,!localhost') }}"
- name: register no_proxy
command: /bin/echo "{{ no_proxy }}"
register: no_proxy_var

- hosts: controller
tasks:
- name: fetch vsp_info
slurp:
src: /etc/ci/vsp_info.yaml
register: vsp_info

- 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/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.opendev.org \
openstack/devstack-gate
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_NEUTRON=1
export BRANCH_OVERRIDE=default
export DEVSTACK_PROJECT_FROM_GIT=python-openstackclient
export NUAGE_OS_RELEASE=${ZUUL_BRANCH#*/}
export NODEPOOL_MIRROR_HOST={{ zuul_site_mirror_fqdn }}
if [ -f /etc/ci/vsp_info.sh ]; then
source /etc/ci/vsp_info.sh
fi
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
export VSP_RELEASE={{ nuage_vsp_release }}
export DEVSTACK_GATE_TOPOLOGY=aio
export DEVSTACK_GATE_LIBVIRT_TYPE=kvm
# by default devstack-gate will include bunch of projects
# we dont actually need. We ovewrite project list here
PROJECTS="openstack/devstack-gate"
PROJECTS="openstack/devstack $PROJECTS"
PROJECTS="openstack/cinder $PROJECTS"
PROJECTS="openstack/glance $PROJECTS"
PROJECTS="openstack/keystone $PROJECTS"
PROJECTS="openstack/neutron $PROJECTS"
PROJECTS="openstack/nova $PROJECTS"
PROJECTS="openstack/placement $PROJECTS"
PROJECTS="openstack/python-openstackclient $PROJECTS"
PROJECTS="openstack/requirements $PROJECTS"
PROJECTS="OpenStack/nuage-openstack-neutron $PROJECTS"
PROJECTS="OpenStack/nuage-openstack-neutronclient $PROJECTS"
export DEVSTACK_GATE_PROJECTS_OVERRIDE="$PROJECTS"
PRIMARY_IP="{{ hostvars['primary']['ansible_default_ipv4']['address'] }}"
# add own address and VSD ip to no proxy
export no_proxy=$no_proxy,${PRIMARY_IP},${VSD_SERVER%%:*}
# get own ip and derrive cidr for public net from it,
# to avoid overlap on VSD by multiple gate hosts
group=$(echo ${PRIMARY_IP} | awk -F. '{print $3}')
GW="172.${group}.${PRIMARY_IP##*.}.1"
export DEVSTACK_GATE_FLOATING_RANGE="172.${group}.${PRIMARY_IP##*.}.0/24"
export DEVSTACK_GATE_PUBLIC_NETWORK_GATEWAY="${GW}"
function gate_hook {
bash -xe $BASE/new/nuage-openstack-neutronclient/devstack/ci/gate_hook.sh
}
export -f gate_hook
function post_test_hook {
# Configure and run functional tests
bash -xe $BASE/new/nuage-openstack-neutronclient/devstack/ci/post_test_hook.sh functional
}
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 | combine(proxy_env) }}'

- hosts: all
vars:
vsp: "{{ hostvars['controller']['vsp_info']['content'] | b64decode | from_yaml}}"
env:
no_proxy: "{{ hostvars['localhost']['no_proxy_var'].stdout }},{{ vsp['vsd_server'].split(':')[0]}}"
devstack_localrc:
NUAGE_VSD_SERVERS: "{{ vsp['vsd_server'] }}"
NUAGE_VSC_SERVER: "{{ vsp['vsc_controller'] }}"
NUAGE_VSP_RELEASE: "{{ vsp['nuage_vsp_release'] }}"
roles:
- setup-nuage-source-dirs
- write-vsp-devstack-local-conf
- run-devstack
# Run bindep and test-setup after devstack so that they won't interfere
- role: bindep
bindep_profile: test
bindep_dir: "{{ zuul_work_dir }}"
- test-setup
- ensure-tox
- tox
environment: '{{ proxy_env|combine(env) }}'

0 comments on commit 466a438

Please sign in to comment.