Merge "Move entirely to dynamic job execution"
This commit is contained in:
commit
22f248f7cb
|
@ -24,6 +24,7 @@ bootstrap_host_special_word_list:
|
|||
- source
|
||||
- telemetry
|
||||
- translations
|
||||
- varstest
|
||||
|
||||
bootstrap_host_services: >-
|
||||
{%- set scenario_list = (bootstrap_host_scenario.split('_') | reject('equalto', '')) | list %}
|
||||
|
|
|
@ -34,10 +34,6 @@
|
|||
- ^setup\.(cfg|py)$
|
||||
- ^tox.ini$
|
||||
- ^Vagrantfile
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_lxc
|
||||
install_method: source
|
||||
|
||||
# Ensuring overrides work
|
||||
- job:
|
||||
|
@ -78,9 +74,6 @@
|
|||
name: openstack-ansible-deploy-aio_metal-debian-stable
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: debian-stable
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_metal
|
||||
|
||||
# ubuntu
|
||||
- job:
|
||||
|
@ -92,107 +85,68 @@
|
|||
name: openstack-ansible-deploy-aio_distro_lxc-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_ceph-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_ceph
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_proxy-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_proxy
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_distro_ceph-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_ceph
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_metal-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_metal
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_telemetry_metal-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_telemetry_metal
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_distro_metal-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_metal
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-upgrade-aio_lxc-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
timeout: 10800
|
||||
vars:
|
||||
action: upgrade
|
||||
scenario: aio_lxc
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_nspawn-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
scenario: aio_nspawn
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-upgrade-aio_ceph-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
timeout: 10800
|
||||
vars:
|
||||
action: upgrade
|
||||
scenario: aio_ceph
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_octavia-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_octavia
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_qdrouterd-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_qdrouterd
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-translations-ubuntu-bionic
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: ubuntu-bionic
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: translations
|
||||
|
||||
# centos
|
||||
- job:
|
||||
|
@ -204,84 +158,54 @@
|
|||
name: openstack-ansible-deploy-aio_distro_lxc-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
vars:
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_ceph-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_ceph
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_distro_ceph-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_ceph
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-upgrade-aio_lxc-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
timeout: 10800
|
||||
vars:
|
||||
action: upgrade
|
||||
scenario: aio_lxc
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_metal-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
vars:
|
||||
actio: deploy
|
||||
scenario: aio_metal
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_telemetry_metal-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_telemetry_metal
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_distro_metal-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_metal
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_nspawn-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
vars:
|
||||
scenario: aio_nspawn
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-upgrade-aio_ceph-centos-7
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: centos-7
|
||||
timeout: 10800
|
||||
vars:
|
||||
action: upgrade
|
||||
scenario: aio_ceph
|
||||
|
||||
# debian
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_telemetry_metal-debian-stable
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: debian-stable
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_telemetry_metal
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_lxc-debian-stable
|
||||
|
@ -298,54 +222,33 @@
|
|||
name: openstack-ansible-deploy-aio_distro_lxc-opensuse-150
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: opensuse-150
|
||||
vars:
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_ceph-opensuse-150
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: opensuse-150
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_ceph
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_distro_ceph-opensuse-150
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: opensuse-150
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_ceph
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_metal-opensuse-150
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: opensuse-150
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_metal
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_telemetry_metal-opensuse-150
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: opensuse-150
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_telemetry_metal
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_distro_metal-opensuse-150
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: opensuse-150
|
||||
vars:
|
||||
action: deploy
|
||||
scenario: aio_metal
|
||||
install_method: distro
|
||||
|
||||
- job:
|
||||
name: openstack-ansible-deploy-aio_nspawn-opensuse-150
|
||||
parent: openstack-ansible-deploy-aio
|
||||
nodeset: opensuse-150
|
||||
vars:
|
||||
scenario: aio_nspawn
|
||||
|
|
|
@ -5,32 +5,73 @@
|
|||
ceilometer: telemetry
|
||||
gnocchi: telemetry
|
||||
horizon: lxc
|
||||
install_methods:
|
||||
- distro
|
||||
- source
|
||||
tasks:
|
||||
- name: Dynamically determine additional scenario elements
|
||||
- name: Dynamically create scenario if not set
|
||||
set_fact:
|
||||
scenario: |-
|
||||
{% set _scenario = [] %}
|
||||
{# Add the scenarios based on the job name #}
|
||||
{# ex. openstack-ansible-deploy-$scenario1_$scenario2-$os #}
|
||||
{% if zuul.job is match('^openstack-ansible-deploy-([^-]+)-.*$') %}
|
||||
{% set _ = _scenario.extend(
|
||||
(zuul.job |
|
||||
regex_replace('^openstack-ansible-deploy-([^-]+)-.*$', '\\1')).split('_')
|
||||
)
|
||||
%}
|
||||
{% endif %}
|
||||
{# If testing a role, add the role service name to the scenario list #}
|
||||
{% if zuul.project.short_name is match('^openstack-ansible-os_(.*)$') %}
|
||||
{% set role_service_name = zuul.project.short_name |
|
||||
regex_replace('^openstack-ansible-os_(.*)$', '\\1')
|
||||
%}
|
||||
{% set _ = _scenario.append(role_service_name) %}
|
||||
{# Add special scenarios based on the project name #}
|
||||
{% if role_service_name in scenario_map %}
|
||||
{% set _ = _scenario.extend(scenario_map[service_name].split('_')) %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ _scenario | join('_') }}
|
||||
when:
|
||||
- zuul.project.short_name is match("^openstack-ansible-os_(.*)$")
|
||||
- (dynamic_scenario | default(True)) | bool
|
||||
block:
|
||||
- name: Set service_name
|
||||
set_fact:
|
||||
service_name: "{{ zuul.project.short_name | regex_replace('^openstack-ansible-os_(.*)$', '\\1') }}"
|
||||
- scenario is not defined
|
||||
|
||||
- name: Set scenario_suffix
|
||||
set_fact:
|
||||
scenario_suffix: "{{ scenario_map[service_name] | default(service_name) }}"
|
||||
- name: Dynamically set action if not set
|
||||
set_fact:
|
||||
action: "{{ zuul.job | regex_replace('^openstack-ansible-([^-]+)-.*$', '\\1') }}"
|
||||
when:
|
||||
- action is not defined
|
||||
|
||||
# Horizon's apache uses the same ip:port combinations as
|
||||
# the repo server's nginx service. As such, we force the
|
||||
# use of containers to ensure that they do not conflict.
|
||||
- name: Add services based on test repo name
|
||||
set_fact:
|
||||
scenario: "{{ (service_name == 'horizon') | ternary(scenario | regex_replace('_metal', ''), scenario) }}_{{ scenario_suffix }}"
|
||||
- name: Dynamically set install method if not set
|
||||
set_fact:
|
||||
install_method: "{{ (scenario.split('_') | intersect(install_methods))[0] }}"
|
||||
when:
|
||||
- install_method is not defined
|
||||
- scenario.split('_') | intersect(install_methods) | length > 0
|
||||
|
||||
- name: Set install method to source as a baseline default
|
||||
set_fact:
|
||||
install_method: source
|
||||
when:
|
||||
- install_method is not defined
|
||||
|
||||
- name: Print gate check configuration
|
||||
debug:
|
||||
msg: |-
|
||||
Running gate-check-commit with the following arguments:
|
||||
Scenario: {{ scenario }}
|
||||
Action: {{ action }}
|
||||
Install Method: {{ install_method }}
|
||||
|
||||
- name: Run gate-check-commit.sh script
|
||||
become: yes
|
||||
become_user: root
|
||||
shell: >-
|
||||
scripts/gate-check-commit.sh {{ scenario }} {{ action }} {{ install_method }}
|
||||
scripts/gate-check-commit.sh
|
||||
{{ scenario | quote }}
|
||||
{{ action | quote }}
|
||||
{{ install_method | quote }}
|
||||
args:
|
||||
chdir: "src/opendev.org/openstack/openstack-ansible"
|
||||
executable: /bin/bash
|
||||
|
|
Loading…
Reference in New Issue