Merge "Zuul v3: add a devstack-legacy job"

This commit is contained in:
Jenkins 2017-09-07 17:23:50 +00:00 committed by Gerrit Code Review
commit aaf4774b58
6 changed files with 160 additions and 3 deletions

View File

@ -1,3 +1,9 @@
- nodeset:
name: devstack-single-node
nodes:
- name: primary
label: ubuntu-xenial
- job:
name: devstack
parent: multinode
@ -17,8 +23,96 @@
LIBVIRT_TYPE=lxc
NOVA_BACKEND=LVM
- job:
name: devstack-legacy
parent: base-test
description: |
Legacy devstack base job
This job runs devstack-gate with as few changes as possible and
may be used by jobs which have been automatically converted as
part of the migration to Zuul v3.
nodes: devstack-single-node
required-projects:
- openstack-dev/devstack
- openstack-infra/devstack-gate
- openstack-infra/tripleo-ci
- openstack/ceilometer
- openstack/ceilometermiddleware
- openstack/cinder
- openstack/django_openstack_auth
- openstack/glance
- openstack/glance_store
- openstack/heat
- openstack/heat-cfntools
- openstack/heat-templates
- openstack/horizon
- openstack/keystone
- openstack/keystoneauth
- openstack/keystonemiddleware
- openstack/manila
- openstack/manila-ui
- openstack/neutron
- openstack/neutron-fwaas
- openstack/neutron-lbaas
- openstack/neutron-vpnaas
- openstack/nova
- openstack/octavia
- openstack/os-apply-config
- openstack/os-brick
- openstack/os-client-config
- openstack/os-collect-config
- openstack/os-net-config
- openstack/os-refresh-config
- openstack/osc-lib
- openstack/requirements
- openstack/swift
- openstack/tempest
- openstack/tempest-lib
- openstack/tripleo-heat-templates
- openstack/tripleo-image-elements
- openstack/tripleo-incubator
- openstack/zaqar
timeout: 7200
pre-run:
playbooks/legacy-pre
post-run:
playbooks/legacy-post
- job:
name: devstack-legacy-tempest-dsvm-neutron-full
parent: devstack-legacy
vars:
devstack_local_conf_contents: |
[[local|localrc]]
ENABLE_FILE_INJECTION=True
devstack_legacy_shell: |
#!/bin/bash -xe
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_FULL=1
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_TLSPROXY=1
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
- project:
name: openstack-infra/devstack-gate
check:
jobs:
- devstack-lxc
- devstack-lxc:
files:
- ^playbooks/pre
- ^playbooks/post
- ^playbooks/devstack
- ^roles/
- devstack-legacy-tempest-dsvm-neutron-full:
files:
- ^playbooks/legacy-pre
- ^playbooks/legacy-post
- ^playbooks/devstack-legacy

View File

@ -414,9 +414,9 @@ function setup_workspace {
rsync -a ~/src/*/${PROJECT}/ `basename $PROJECT`
cd `basename $PROJECT`
if git_has_branch ${PROJECT} $base_branch; then
git_checkout ${PROJECT} $base_branch
git checkout $base_branch
else
git_checkout ${PROJECT} master
git checkout master
fi
done
else

View File

@ -0,0 +1,46 @@
- hosts: all
tasks:
- name: Create nodepool directory
file:
path: /etc/nodepool
state: directory
- name: Create nodepool subnodes file
copy:
dest: /etc/nodepool/sub_nodes_private
content: ""
- name: Populate nodepool subnodes file
lineinfile:
path: /etc/nodepool/sub_nodes_private
line: "{{ hostvars[item]['nodepool']['private_ipv4'] }}"
with_items: "{{ groups['subnodes'] }}"
when: groups['subnodes'] is defined
- name: Create nodepool primary file
copy:
dest: /etc/nodepool/primary_node_private
content: "{{ hostvars['primary']['nodepool']['private_ipv4'] }}"
- name: Copy ssh keys to nodepool directory
command: "cp .ssh/{{ item }} /etc/nodepool/{{ item }}"
with_items:
- id_rsa
- id_rsa.pub
- hosts: primary
environment:
WORKSPACE: "{{ ansible_user_dir }}"
ZUUL_BRANCH: "{{ zuul.branch }}"
BUILD_TIMEOUT: 10800000
tasks:
- name: Write legacy shell
copy:
content: "{{ devstack_legacy_shell }}"
dest: "{{ ansible_user_dir }}/devstack-legacy.sh"
mode: 0755
- name: Run devstack-gate wrapper script
shell: |
# The devstack-gate scripts expect a WORKSPACE to exist which has
# devstack-gate inside of it. We could also maybe set WORKSPACE
# to src/git.openstack.org/openstack-infra - but that seems weird.
ln -s src/git.openstack.org/openstack-infra/devstack-gate .
./devstack-legacy.sh
args:
executable: /bin/bash

View File

@ -0,0 +1,13 @@
- hosts: all
tasks:
- name: Collect legacy devstack logs
synchronize:
# The remote dir logs/ is a symlink and rsync is running with
# --safe-symlinks so it will be ignored unless we dereference
# it by appending the trailing / to src. To ensure that the
# devstack logs end up in the logs/ subdirectory, add it to
# the dest explicitly. Yes, that means on disk it's
# .../work/logs/logs/.
dest: "{{ zuul.executor.log_root }}/logs/"
mode: pull
src: "logs/"

View File

@ -0,0 +1,3 @@
- hosts: all
roles:
- write-devstack-local-conf

View File

@ -2,3 +2,4 @@
copy:
dest: /tmp/dg-local.conf
content: '{{ devstack_local_conf_contents }}'
when: devstack_local_conf_contents is defined