Use the new ansible roles for DevStack CI jobs
- Test cases are being installed on /opt/stack/tobiko as the folder is used for DevStack plugin - DevStack plugin generate /etc/tobiko/tobiko.conf file - Tobiko roles use zuul user on test host - Test cases get conf from both configuration files: * /etc/tobiko/tobiko.conf (generated by DevStack plugin) * /opt/stack/tobiko/tobiko.conf (generated by tobiko-configure role) - Tobiko roles are now in charge of managing files recollection therefore log file is no more required to be written into DevStack logs folder Change-Id: If9bc702c3b97764a7ed81e074b407e2f336a6fbf
This commit is contained in:
parent
c9e233f23f
commit
b696f70b21
@ -2,9 +2,7 @@
|
||||
TOBIKO_PLUGIN_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
|
||||
|
||||
function install_tobiko {
|
||||
echo_summary "Installing tobiko-plugin"
|
||||
|
||||
function install_tobiko_deps {
|
||||
if [ "${TOBIKO_BINDEP}" != "" ]; then
|
||||
install_python3
|
||||
install_bindep "${TOBIKO_DIR}/bindep.txt" test
|
||||
@ -163,9 +161,11 @@ function iniset_nonempty {
|
||||
if [[ "$1" == "stack" ]]; then
|
||||
case "$2" in
|
||||
install)
|
||||
install_tobiko
|
||||
echo_summary "Installing Tobiko dependencies"
|
||||
install_tobiko_deps
|
||||
;;
|
||||
test-config)
|
||||
echo_summary "Configuring Tobiko test cases"
|
||||
configure_tobiko
|
||||
;;
|
||||
esac
|
||||
|
@ -1,3 +1,5 @@
|
||||
define_plugin tobiko
|
||||
plugin_requires tobiko heat
|
||||
|
||||
# --- General settings ----
|
||||
TOBIKO_REPO=${TOBIKO_REPO:-${GIT_BASE}/x/tobiko.git}
|
||||
|
@ -1,31 +1,6 @@
|
||||
# Copyright 2018 Red Hat
|
||||
#
|
||||
# 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.
|
||||
|
||||
---
|
||||
|
||||
- hosts: tempest
|
||||
roles:
|
||||
- role: tobiko
|
||||
tags:
|
||||
- tobiko-post-run
|
||||
vars:
|
||||
tobiko_pre_run: false
|
||||
tobiko_run: false
|
||||
tobiko_post_run: true
|
||||
|
||||
|
||||
- hosts: tempest
|
||||
become: true
|
||||
roles:
|
||||
- role: process-stackviz
|
||||
- tobiko-zuul
|
||||
- tobiko-post-run
|
||||
|
@ -1,58 +1,17 @@
|
||||
---
|
||||
|
||||
# devstack copies repos from hardcoded list of organizations only and performa
|
||||
# is not there so e.g. os-faults repo can't be copied there easily and we need
|
||||
# to do this on our own
|
||||
# copied from https://opendev.org/openstack/devstack/src/branch/master/roles/setup-devstack-source-dirs/tasks/main.yaml
|
||||
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Find source repos from performa organization
|
||||
find:
|
||||
paths:
|
||||
- src/opendev.org/performa
|
||||
file_type: directory
|
||||
register: found_repos
|
||||
|
||||
- name: Copy Zuul repos into devstack working directory
|
||||
synchronize:
|
||||
src: "{{ item.path }}"
|
||||
dest: /opt/stack
|
||||
use_ssh_args: true
|
||||
recursive: true
|
||||
with_items: '{{ found_repos.files }}'
|
||||
become: yes
|
||||
|
||||
- name: Set ownership of repos
|
||||
file:
|
||||
path: /opt/stack
|
||||
state: directory
|
||||
recurse: true
|
||||
owner: stack
|
||||
group: stack
|
||||
become: yes
|
||||
- hosts: tempest
|
||||
roles:
|
||||
- tobiko-zuul
|
||||
- tobiko-pre-run
|
||||
|
||||
|
||||
- hosts: all
|
||||
roles:
|
||||
|
||||
- role: bindep
|
||||
|
||||
- role: copy-build-sshkey
|
||||
copy_sshkey_target_user: stack
|
||||
vars:
|
||||
copy_sshkey_target_user: zuul
|
||||
|
||||
- role: multi-node-setup
|
||||
|
||||
- role: orchestrate-devstack
|
||||
|
||||
|
||||
- hosts: tempest
|
||||
roles:
|
||||
|
||||
- role: tobiko
|
||||
tags:
|
||||
- tobiko-pre-run
|
||||
vars:
|
||||
tobiko_pre_run: true
|
||||
tobiko_run: false
|
||||
tobiko_post_run: false
|
||||
|
@ -16,8 +16,5 @@
|
||||
|
||||
- hosts: tempest
|
||||
roles:
|
||||
- role: tobiko
|
||||
vars:
|
||||
tobiko_pre_run: false
|
||||
tobiko_run: true
|
||||
tobiko_post_run: false
|
||||
- tobiko-zuul
|
||||
- tobiko-run
|
||||
|
4
roles/tobiko-zuul/meta/main.yaml
Normal file
4
roles/tobiko-zuul/meta/main.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- role: tobiko-common
|
10
roles/tobiko-zuul/vars/main.yaml
Normal file
10
roles/tobiko-zuul/vars/main.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
|
||||
tobiko_src_dir: "{{ zuul.executor.work_root }}/{{ zuul.projects['opendev.org/x/tobiko'].src_dir }}"
|
||||
# tobiko_dir: '/opt/stack/tobiko'
|
||||
tobiko_user: 'zuul'
|
||||
# test_conf_file: '/etc/tobiko/tobiko.conf'
|
||||
test_src_dir: '{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}'
|
||||
test_dir: '{{ tobiko_dir }}'
|
||||
test_user: 'zuul'
|
||||
test_collect_dir: '{{ zuul.executor.log_root }}'
|
@ -60,19 +60,15 @@
|
||||
$NOVA_CONF:
|
||||
quota:
|
||||
instances: 20
|
||||
test_results_stage_name: test_results
|
||||
zuul_copy_output:
|
||||
'{{ devstack_log_dir }}/tobiko*.log': logs
|
||||
'{{ stage_dir }}/stackviz': logs
|
||||
extensions_to_txt:
|
||||
conf: true
|
||||
log: true
|
||||
yaml: true
|
||||
yml: true
|
||||
tobiko_user: stack
|
||||
tobiko_dir: /opt/stack/tobiko
|
||||
tobiko_log_file: /opt/stack/logs/tobiko.log
|
||||
test_report_dir: /opt/stack/logs
|
||||
tobiko_dir: '/opt/stack/tobiko'
|
||||
test_src_dir: '{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}'
|
||||
|
||||
pre-run: playbooks/devstack/pre.yaml
|
||||
run: playbooks/devstack/run.yaml
|
||||
@ -102,8 +98,6 @@
|
||||
- openstack/tripleo-image-elements
|
||||
timeout: 7800
|
||||
vars:
|
||||
devstack_plugins:
|
||||
octavia: https://opendev.org/openstack/octavia
|
||||
devstack_services:
|
||||
# Octavia
|
||||
octavia: true
|
||||
@ -134,7 +128,7 @@
|
||||
description: |
|
||||
Base Tobiko devstack job to execute functional tests.
|
||||
vars:
|
||||
tox_envlist: functional
|
||||
test_workflow: functional
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/
|
||||
@ -161,28 +155,9 @@
|
||||
|
||||
|
||||
- job:
|
||||
name: tobiko-devstack-scenario
|
||||
name: tobiko-devstack-multinode
|
||||
parent: tobiko-devstack
|
||||
abstract: true
|
||||
description: |
|
||||
Integration test that runs all tests against DevStack provided cloud
|
||||
vars:
|
||||
tox_envlist: scenario
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/
|
||||
- ^infrared/
|
||||
- ^releasenotes/
|
||||
- ^report/
|
||||
- ^tobiko/tests/faults/
|
||||
- ^tobiko/tests/functional/
|
||||
- ^tobiko/tests/unit/
|
||||
|
||||
|
||||
- job:
|
||||
name: tobiko-devstack-scenario-multinode
|
||||
parent: tobiko-devstack-scenario
|
||||
abstract: true
|
||||
description: Base Tobiko devstack job with multinode.
|
||||
vars:
|
||||
topology: multinode
|
||||
@ -214,12 +189,12 @@
|
||||
|
||||
- job:
|
||||
name: tobiko-devstack-faults
|
||||
parent: tobiko-devstack-scenario-multinode
|
||||
parent: tobiko-devstack-multinode
|
||||
abstract: true
|
||||
description: |
|
||||
Base Tobiko devstack job to execute scenario+faults+scenario test cases.
|
||||
vars:
|
||||
tobiko_run_faults: true
|
||||
test_workflow: faults
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/
|
Loading…
Reference in New Issue
Block a user