Move entirely to dynamic job execution
If the gate job's scenario, action, or install method are not directly provided via vars, attempt to identify them from the Zuul job name. Change-Id: Id33c85d1547e385ae9bd083880b0374c6f684f17
This commit is contained in:
parent
900376c5bf
commit
463d25ee0d
@ -24,6 +24,7 @@ bootstrap_host_special_word_list:
|
|||||||
- source
|
- source
|
||||||
- telemetry
|
- telemetry
|
||||||
- translations
|
- translations
|
||||||
|
- varstest
|
||||||
|
|
||||||
bootstrap_host_services: >-
|
bootstrap_host_services: >-
|
||||||
{%- set scenario_list = (bootstrap_host_scenario.split('_') | reject('equalto', '')) | list %}
|
{%- set scenario_list = (bootstrap_host_scenario.split('_') | reject('equalto', '')) | list %}
|
||||||
|
@ -34,10 +34,6 @@
|
|||||||
- ^setup\.(cfg|py)$
|
- ^setup\.(cfg|py)$
|
||||||
- ^tox.ini$
|
- ^tox.ini$
|
||||||
- ^Vagrantfile
|
- ^Vagrantfile
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_lxc
|
|
||||||
install_method: source
|
|
||||||
|
|
||||||
# Ensuring overrides work
|
# Ensuring overrides work
|
||||||
- job:
|
- job:
|
||||||
@ -78,9 +74,6 @@
|
|||||||
name: openstack-ansible-deploy-aio_metal-debian-stable
|
name: openstack-ansible-deploy-aio_metal-debian-stable
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: debian-stable
|
nodeset: debian-stable
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_metal
|
|
||||||
|
|
||||||
# ubuntu
|
# ubuntu
|
||||||
- job:
|
- job:
|
||||||
@ -92,107 +85,68 @@
|
|||||||
name: openstack-ansible-deploy-aio_distro_lxc-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_distro_lxc-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_ceph-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_ceph-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_ceph
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_proxy-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_proxy-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_proxy
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_distro_ceph-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_distro_ceph-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_ceph
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_metal-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_metal-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_metal
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_telemetry_metal-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_telemetry_metal-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_telemetry_metal
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_distro_metal-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_distro_metal-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_metal
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-upgrade-aio_lxc-ubuntu-bionic
|
name: openstack-ansible-upgrade-aio_lxc-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
timeout: 10800
|
timeout: 10800
|
||||||
vars:
|
|
||||||
action: upgrade
|
|
||||||
scenario: aio_lxc
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_nspawn-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_nspawn-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
scenario: aio_nspawn
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-upgrade-aio_ceph-ubuntu-bionic
|
name: openstack-ansible-upgrade-aio_ceph-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
timeout: 10800
|
timeout: 10800
|
||||||
vars:
|
|
||||||
action: upgrade
|
|
||||||
scenario: aio_ceph
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_octavia-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_octavia-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_octavia
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_qdrouterd-ubuntu-bionic
|
name: openstack-ansible-deploy-aio_qdrouterd-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_qdrouterd
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-translations-ubuntu-bionic
|
name: openstack-ansible-deploy-translations-ubuntu-bionic
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: ubuntu-bionic
|
nodeset: ubuntu-bionic
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: translations
|
|
||||||
|
|
||||||
# centos
|
# centos
|
||||||
- job:
|
- job:
|
||||||
@ -204,84 +158,54 @@
|
|||||||
name: openstack-ansible-deploy-aio_distro_lxc-centos-7
|
name: openstack-ansible-deploy-aio_distro_lxc-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
vars:
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_ceph-centos-7
|
name: openstack-ansible-deploy-aio_ceph-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_ceph
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_distro_ceph-centos-7
|
name: openstack-ansible-deploy-aio_distro_ceph-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_ceph
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-upgrade-aio_lxc-centos-7
|
name: openstack-ansible-upgrade-aio_lxc-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
timeout: 10800
|
timeout: 10800
|
||||||
vars:
|
|
||||||
action: upgrade
|
|
||||||
scenario: aio_lxc
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_metal-centos-7
|
name: openstack-ansible-deploy-aio_metal-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
vars:
|
|
||||||
actio: deploy
|
|
||||||
scenario: aio_metal
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_telemetry_metal-centos-7
|
name: openstack-ansible-deploy-aio_telemetry_metal-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_telemetry_metal
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_distro_metal-centos-7
|
name: openstack-ansible-deploy-aio_distro_metal-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_metal
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_nspawn-centos-7
|
name: openstack-ansible-deploy-aio_nspawn-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
vars:
|
|
||||||
scenario: aio_nspawn
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-upgrade-aio_ceph-centos-7
|
name: openstack-ansible-upgrade-aio_ceph-centos-7
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: centos-7
|
nodeset: centos-7
|
||||||
timeout: 10800
|
timeout: 10800
|
||||||
vars:
|
|
||||||
action: upgrade
|
|
||||||
scenario: aio_ceph
|
|
||||||
|
|
||||||
# debian
|
# debian
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_telemetry_metal-debian-stable
|
name: openstack-ansible-deploy-aio_telemetry_metal-debian-stable
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: debian-stable
|
nodeset: debian-stable
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_telemetry_metal
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_lxc-debian-stable
|
name: openstack-ansible-deploy-aio_lxc-debian-stable
|
||||||
@ -298,54 +222,33 @@
|
|||||||
name: openstack-ansible-deploy-aio_distro_lxc-opensuse-150
|
name: openstack-ansible-deploy-aio_distro_lxc-opensuse-150
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: opensuse-150
|
nodeset: opensuse-150
|
||||||
vars:
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_ceph-opensuse-150
|
name: openstack-ansible-deploy-aio_ceph-opensuse-150
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: opensuse-150
|
nodeset: opensuse-150
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_ceph
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_distro_ceph-opensuse-150
|
name: openstack-ansible-deploy-aio_distro_ceph-opensuse-150
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: opensuse-150
|
nodeset: opensuse-150
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_ceph
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_metal-opensuse-150
|
name: openstack-ansible-deploy-aio_metal-opensuse-150
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: opensuse-150
|
nodeset: opensuse-150
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_metal
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_telemetry_metal-opensuse-150
|
name: openstack-ansible-deploy-aio_telemetry_metal-opensuse-150
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: opensuse-150
|
nodeset: opensuse-150
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_telemetry_metal
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_distro_metal-opensuse-150
|
name: openstack-ansible-deploy-aio_distro_metal-opensuse-150
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: opensuse-150
|
nodeset: opensuse-150
|
||||||
vars:
|
|
||||||
action: deploy
|
|
||||||
scenario: aio_metal
|
|
||||||
install_method: distro
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: openstack-ansible-deploy-aio_nspawn-opensuse-150
|
name: openstack-ansible-deploy-aio_nspawn-opensuse-150
|
||||||
parent: openstack-ansible-deploy-aio
|
parent: openstack-ansible-deploy-aio
|
||||||
nodeset: opensuse-150
|
nodeset: opensuse-150
|
||||||
vars:
|
|
||||||
scenario: aio_nspawn
|
|
||||||
|
@ -5,32 +5,73 @@
|
|||||||
ceilometer: telemetry
|
ceilometer: telemetry
|
||||||
gnocchi: telemetry
|
gnocchi: telemetry
|
||||||
horizon: lxc
|
horizon: lxc
|
||||||
|
install_methods:
|
||||||
|
- distro
|
||||||
|
- source
|
||||||
tasks:
|
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:
|
when:
|
||||||
- zuul.project.short_name is match("^openstack-ansible-os_(.*)$")
|
- scenario is not defined
|
||||||
- (dynamic_scenario | default(True)) | bool
|
|
||||||
block:
|
|
||||||
- name: Set service_name
|
|
||||||
set_fact:
|
|
||||||
service_name: "{{ zuul.project.short_name | regex_replace('^openstack-ansible-os_(.*)$', '\\1') }}"
|
|
||||||
|
|
||||||
- name: Set scenario_suffix
|
- name: Dynamically set action if not set
|
||||||
set_fact:
|
set_fact:
|
||||||
scenario_suffix: "{{ scenario_map[service_name] | default(service_name) }}"
|
action: "{{ zuul.job | regex_replace('^openstack-ansible-([^-]+)-.*$', '\\1') }}"
|
||||||
|
when:
|
||||||
|
- action is not defined
|
||||||
|
|
||||||
# Horizon's apache uses the same ip:port combinations as
|
- name: Dynamically set install method if not set
|
||||||
# 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:
|
set_fact:
|
||||||
scenario: "{{ (service_name == 'horizon') | ternary(scenario | regex_replace('_metal', ''), scenario) }}_{{ scenario_suffix }}"
|
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
|
- name: Run gate-check-commit.sh script
|
||||||
become: yes
|
become: yes
|
||||||
become_user: root
|
become_user: root
|
||||||
shell: >-
|
shell: >-
|
||||||
scripts/gate-check-commit.sh {{ scenario }} {{ action }} {{ install_method }}
|
scripts/gate-check-commit.sh
|
||||||
|
{{ scenario | quote }}
|
||||||
|
{{ action | quote }}
|
||||||
|
{{ install_method | quote }}
|
||||||
args:
|
args:
|
||||||
chdir: "src/opendev.org/openstack/openstack-ansible"
|
chdir: "src/opendev.org/openstack/openstack-ansible"
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user