Add native Zuulv3 jobs
Do step 2: Reworking Legacy Jobs to be v3 Native Depends-On: https://review.openstack.org/#/c/545724/ Change-Id: Ic86e9c13d3837728bf596779f940ce405ca15cd2 Implements: blueprint migrate-to-zuulv3
This commit is contained in:
parent
fb0dcf1a18
commit
725d4c1e54
90
.zuul.yaml
90
.zuul.yaml
@ -1,63 +1,79 @@
|
||||
- job:
|
||||
name: zun-devstack-base
|
||||
parent: legacy-dsvm-base
|
||||
name: zun-tempest-base
|
||||
parent: devstack-tempest
|
||||
description: Zun Devstack tempest base job
|
||||
timeout: 4200
|
||||
required-projects:
|
||||
- openstack-dev/devstack
|
||||
- openstack/devstack-plugin-container
|
||||
- openstack/kuryr-libnetwork
|
||||
- openstack/zun
|
||||
- openstack/zun-tempest-plugin
|
||||
- openstack/python-zunclient
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
vars:
|
||||
database: sql
|
||||
use_python3: 0
|
||||
required-projects:
|
||||
- openstack-dev/devstack
|
||||
- openstack-infra/devstack-gate
|
||||
- openstack/devstack-plugin-container
|
||||
- openstack/kuryr-libnetwork
|
||||
- openstack/zun
|
||||
- openstack/python-zunclient
|
||||
- openstack/zun-tempest-plugin
|
||||
run: playbooks/zun-devstack-base/run.yaml
|
||||
post-run: playbooks/zun-devstack-base/post.yaml
|
||||
tox_envlist: 'all-plugin'
|
||||
tempest_test_regex: 'zun_tempest_plugin.tests.tempest.api'
|
||||
devstack_localrc:
|
||||
ZUN_USE_UWSGI: True
|
||||
KURYR_CONFIG_DIR: /etc/kuryr-libnetwork
|
||||
ZUN_DRIVER: docker
|
||||
ZUN_DB_TYPE: sql
|
||||
devstack_services:
|
||||
tempest: True
|
||||
devstack_plugins:
|
||||
zun: https://git.openstack.org/openstack/zun
|
||||
kuryr-libnetwork: https://git.openstack.org/openstack/kuryr-libnetwork
|
||||
devstack-plugin-container: https://git.openstack.org/openstack/devstack-plugin-container
|
||||
zun-tempest-plugin: https://git.openstack.org/openstack/zun-tempest-plugin
|
||||
post-run: playbooks/zun-tempest-base/post.yaml
|
||||
|
||||
- job:
|
||||
name: zun-devstack-base-multinode
|
||||
parent: legacy-dsvm-base-multinode
|
||||
name: zun-tempest-base-multinode
|
||||
parent: zun-tempest-base
|
||||
description: Zun Devstack tempest multinode base job
|
||||
nodeset: openstack-two-node
|
||||
timeout: 7800
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
required-projects:
|
||||
- openstack-dev/devstack
|
||||
- openstack-infra/devstack-gate
|
||||
- openstack/devstack-plugin-container
|
||||
- openstack/kuryr-libnetwork
|
||||
- openstack/zun
|
||||
- openstack/python-zunclient
|
||||
- openstack/zun-tempest-plugin
|
||||
nodeset: legacy-ubuntu-xenial-2-node
|
||||
run: playbooks/zun-devstack-base-multinode/run.yaml
|
||||
post-run: playbooks/zun-devstack-base-multinode/post.yaml
|
||||
|
||||
vars:
|
||||
devstack_localrc:
|
||||
KURYR_PROCESS_EXTERNAL_CONNECTIVITY: False
|
||||
KURYR_CAPABILITY_SCOPE: global
|
||||
group-vars:
|
||||
peers:
|
||||
devstack_localrc:
|
||||
KURYR_CAPABILITY_SCOPE: global
|
||||
KURYR_PROCESS_EXTERNAL_CONNECTIVITY: False
|
||||
KURYR_CONFIG_DIR: /etc/kuryr-libnetwork
|
||||
- job:
|
||||
name: zun-tempest-docker-sql
|
||||
parent: zun-devstack-base
|
||||
parent: zun-tempest-base
|
||||
|
||||
- job:
|
||||
name: zun-tempest-py35-docker-sql
|
||||
parent: zun-devstack-base
|
||||
parent: zun-tempest-base
|
||||
vars:
|
||||
use_python3: 1
|
||||
devstack_localrc:
|
||||
USE_PYTHON3: True
|
||||
devstack_services:
|
||||
s-account: false
|
||||
s-object: false
|
||||
s-container: false
|
||||
s-proxy: false
|
||||
|
||||
- job:
|
||||
name: zun-tempest-multinode-docker-sql
|
||||
parent: zun-devstack-base-multinode
|
||||
parent: zun-tempest-base-multinode
|
||||
voting: false
|
||||
|
||||
- job:
|
||||
name: zun-tempest-docker-etcd
|
||||
parent: zun-devstack-base
|
||||
parent: zun-tempest-base
|
||||
vars:
|
||||
database: etcd
|
||||
devstack_localrc:
|
||||
ZUN_DB_TYPE: etcd
|
||||
KURYR_ETCD_PORT: 2379
|
||||
|
||||
- project:
|
||||
check:
|
||||
|
@ -1,15 +0,0 @@
|
||||
- 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
|
@ -1,82 +0,0 @@
|
||||
- hosts: primary
|
||||
name: Zun devstack base multinode
|
||||
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
|
||||
LIBS_FROM_GIT="python-zunclient"
|
||||
KURYR_CAPABILITY_SCOPE=global
|
||||
KURYR_PROCESS_EXTERNAL_CONNECTIVITY=False
|
||||
|
||||
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=1
|
||||
export DEVSTACK_GATE_NEUTRON=1
|
||||
|
||||
# Enable tempest for tempest plugin
|
||||
export ENABLED_SERVICES=tempest
|
||||
|
||||
export PROJECTS="openstack/zun $PROJECTS"
|
||||
export PROJECTS="openstack/kuryr-libnetwork $PROJECTS"
|
||||
export PROJECTS="openstack/python-zunclient $PROJECTS"
|
||||
export PROJECTS="openstack/devstack-plugin-container $PROJECTS"
|
||||
export PROJECTS="openstack/zun-tempest-plugin $PROJECTS"
|
||||
|
||||
# Keep localrc to be able to set some vars in post_test_hook
|
||||
export KEEP_LOCALRC=1
|
||||
export DEVSTACK_GATE_TOPOLOGY="multinode"
|
||||
|
||||
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/zun/
|
||||
./zun/tests/contrib/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 }}'
|
@ -1,15 +0,0 @@
|
||||
- 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
|
@ -1,90 +0,0 @@
|
||||
- hosts: all
|
||||
name: Zun devstack base
|
||||
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
|
||||
LIBS_FROM_GIT="python-zunclient"
|
||||
KURYR_PROCESS_EXTERNAL_CONNECTIVITY=False
|
||||
|
||||
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/kuryr-libnetwork $PROJECTS"
|
||||
export PROJECTS="openstack/python-zunclient $PROJECTS"
|
||||
export PROJECTS="openstack/devstack-plugin-container $PROJECTS"
|
||||
export PROJECTS="openstack/zun-tempest-plugin $PROJECTS"
|
||||
|
||||
# Keep localrc to be able to set some vars in post_test_hook
|
||||
export KEEP_LOCALRC=1
|
||||
|
||||
if [ "{{ use_python3 }}" -eq 1 ] ; then
|
||||
export DEVSTACK_GATE_USE_PYTHON3=True
|
||||
# Swift does not work so skip s-* for python3x for now
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-account"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-container"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-object"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-proxy"
|
||||
else
|
||||
export DEVSTACK_GATE_USE_PYTHON3=False
|
||||
fi
|
||||
|
||||
function gate_hook {
|
||||
cd /opt/stack/new/zun/
|
||||
./zun/tests/contrib/gate_hook.sh docker "{{ database }}"
|
||||
}
|
||||
export -f gate_hook
|
||||
|
||||
function post_test_hook {
|
||||
source $BASE/new/devstack/accrc/admin/admin
|
||||
cd /opt/stack/new/zun/
|
||||
./zun/tests/contrib/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 }}'
|
13
playbooks/zun-tempest-base/post.yaml
Normal file
13
playbooks/zun-tempest-base/post.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Ensure {{ ansible_user_dir }}/logs exists
|
||||
become: True
|
||||
file:
|
||||
path: "{{ ansible_user_dir }}/logs"
|
||||
state: directory
|
||||
owner: "{{ ansible_user }}"
|
||||
- name: Copy over docker systemd unit journals
|
||||
shell:
|
||||
cmd: |
|
||||
sudo journalctl -o short-precise --unit docker | sudo tee {{ ansible_user_dir }}/logs/docker.txt > /dev/null
|
||||
executable: /bin/bash
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Migrate all upstream gates to Zuulv3 native format.
|
||||
|
@ -1,50 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# This script is executed inside gate_hook function in devstack gate.
|
||||
|
||||
|
||||
# Keep all devstack settings here instead of project-config for easy
|
||||
# maintain if we want to change devstack config settings in future.
|
||||
|
||||
driver=$1
|
||||
db=$2
|
||||
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin kuryr-libnetwork https://git.openstack.org/openstack/kuryr-libnetwork"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin devstack-plugin-container https://git.openstack.org/openstack/devstack-plugin-container"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"ZUN_USE_UWSGI=True"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"KURYR_CONFIG_DIR=/etc/kuryr-libnetwork"
|
||||
export DEVSTACK_GATE_TEMPEST=1
|
||||
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
|
||||
export DEVSTACK_GATE_TEMPEST_REGEX="zun_tempest_plugin.tests.tempest.api"
|
||||
|
||||
if [ "$driver" = "docker" ]; then
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"ZUN_DRIVER=docker"
|
||||
fi
|
||||
|
||||
if [ "$db" = "etcd" ]; then
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"ZUN_DB_TYPE=etcd"
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"KURYR_ETCD_PORT=2379"
|
||||
elif [ "$db" = "sql" ]; then
|
||||
export DEVSTACK_LOCAL_CONFIG+=$'\n'"ZUN_DB_TYPE=sql"
|
||||
fi
|
||||
|
||||
$BASE/new/devstack-gate/devstack-vm-gate.sh
|
||||
gate_retval=$?
|
||||
|
||||
# Copy over docker systemd unit journals.
|
||||
mkdir -p $WORKSPACE/logs
|
||||
sudo journalctl -o short-precise --unit docker | sudo tee $WORKSPACE/logs/docker.txt > /dev/null
|
||||
|
||||
exit $gate_retval
|
@ -1,23 +0,0 @@
|
||||
#!/bin/bash -x
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# This script is executed inside post_test_hook function in devstack gate.
|
||||
|
||||
# Save trace setting
|
||||
XTRACE=$(set +o | grep xtrace)
|
||||
set -o xtrace
|
||||
|
||||
# NOTE(hongbin): reserve for future post test processing
|
||||
|
||||
$XTRACE
|
Loading…
Reference in New Issue
Block a user