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:
|
- job:
|
||||||
name: zun-devstack-base
|
name: zun-tempest-base
|
||||||
parent: legacy-dsvm-base
|
parent: devstack-tempest
|
||||||
|
description: Zun Devstack tempest base job
|
||||||
timeout: 4200
|
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:
|
irrelevant-files:
|
||||||
- ^.*\.rst$
|
- ^.*\.rst$
|
||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
vars:
|
vars:
|
||||||
database: sql
|
tox_envlist: 'all-plugin'
|
||||||
use_python3: 0
|
tempest_test_regex: 'zun_tempest_plugin.tests.tempest.api'
|
||||||
required-projects:
|
devstack_localrc:
|
||||||
- openstack-dev/devstack
|
ZUN_USE_UWSGI: True
|
||||||
- openstack-infra/devstack-gate
|
KURYR_CONFIG_DIR: /etc/kuryr-libnetwork
|
||||||
- openstack/devstack-plugin-container
|
ZUN_DRIVER: docker
|
||||||
- openstack/kuryr-libnetwork
|
ZUN_DB_TYPE: sql
|
||||||
- openstack/zun
|
devstack_services:
|
||||||
- openstack/python-zunclient
|
tempest: True
|
||||||
- openstack/zun-tempest-plugin
|
devstack_plugins:
|
||||||
run: playbooks/zun-devstack-base/run.yaml
|
zun: https://git.openstack.org/openstack/zun
|
||||||
post-run: playbooks/zun-devstack-base/post.yaml
|
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:
|
- job:
|
||||||
name: zun-devstack-base-multinode
|
name: zun-tempest-base-multinode
|
||||||
parent: legacy-dsvm-base-multinode
|
parent: zun-tempest-base
|
||||||
|
description: Zun Devstack tempest multinode base job
|
||||||
|
nodeset: openstack-two-node
|
||||||
timeout: 7800
|
timeout: 7800
|
||||||
irrelevant-files:
|
vars:
|
||||||
- ^.*\.rst$
|
devstack_localrc:
|
||||||
- ^doc/.*$
|
KURYR_PROCESS_EXTERNAL_CONNECTIVITY: False
|
||||||
required-projects:
|
KURYR_CAPABILITY_SCOPE: global
|
||||||
- openstack-dev/devstack
|
group-vars:
|
||||||
- openstack-infra/devstack-gate
|
peers:
|
||||||
- openstack/devstack-plugin-container
|
devstack_localrc:
|
||||||
- openstack/kuryr-libnetwork
|
KURYR_CAPABILITY_SCOPE: global
|
||||||
- openstack/zun
|
KURYR_PROCESS_EXTERNAL_CONNECTIVITY: False
|
||||||
- openstack/python-zunclient
|
KURYR_CONFIG_DIR: /etc/kuryr-libnetwork
|
||||||
- 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
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zun-tempest-docker-sql
|
name: zun-tempest-docker-sql
|
||||||
parent: zun-devstack-base
|
parent: zun-tempest-base
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zun-tempest-py35-docker-sql
|
name: zun-tempest-py35-docker-sql
|
||||||
parent: zun-devstack-base
|
parent: zun-tempest-base
|
||||||
vars:
|
vars:
|
||||||
use_python3: 1
|
devstack_localrc:
|
||||||
|
USE_PYTHON3: True
|
||||||
|
devstack_services:
|
||||||
|
s-account: false
|
||||||
|
s-object: false
|
||||||
|
s-container: false
|
||||||
|
s-proxy: false
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zun-tempest-multinode-docker-sql
|
name: zun-tempest-multinode-docker-sql
|
||||||
parent: zun-devstack-base-multinode
|
parent: zun-tempest-base-multinode
|
||||||
voting: false
|
voting: false
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: zun-tempest-docker-etcd
|
name: zun-tempest-docker-etcd
|
||||||
parent: zun-devstack-base
|
parent: zun-tempest-base
|
||||||
vars:
|
vars:
|
||||||
database: etcd
|
devstack_localrc:
|
||||||
|
ZUN_DB_TYPE: etcd
|
||||||
|
KURYR_ETCD_PORT: 2379
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
check:
|
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