Add new standalone_environment_files into featureset_override

As part of [1] we need the ability to override the environment
file passed to standalone jobs for the different scenarios.
This adds a standalone_environment_files parameter into the
allowable values for featureset_override and it expects a list
of paths, relative to /usr/share/openstack-tripleo-heat-templates.
This list will then be passed to the standalone deployment command
using the standalone_custom_env_files (see [1]). With this we
can avoid needing a new featureset to override this environment
for each of the scenario standalone jobs

[1] https://tree.taiga.io/project/tripleo-ci-board/task/363
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
Change-Id: If36d96a96d98b63881ee096eaae54ffc60b6ecf1
This commit is contained in:
Marios Andreou 2018-11-16 17:42:26 +02:00
parent 5b5075c65e
commit a4e805fd5b
1 changed files with 9 additions and 2 deletions

View File

@ -53,17 +53,24 @@
- block:
- name: Check overridable settings
vars:
tempest_overrides:
allowed_overrides:
- 'run_tempest'
- 'tempest_whitelist'
- 'test_black_regex'
- 'tempest_format'
- 'tempest_extra_config'
- 'tempest_plugins'
- 'standalone_environment_files'
fail:
msg: "ERROR: {{ item }} is not overridable."
when: item not in "{{ tempest_overrides }}"
when: item not in "{{ allowed_overrides }}"
with_items: "{{ featureset_override }}"
- name: Generate standalone_custom_env_files from standalone_environment_files
set_fact:
featureset_override: "{{ featureset_override | combine(custom_env, recursive=true) }}"
vars:
custom_env: { 'standalone_custom_env_files': "{{ featureset_override.standalone_environment_files | default([]) | map('regex_replace', '(.*)', '/usr/share/openstack-tripleo-heat-templates/\\1') | list }}" }
when: featureset_override['standalone_environment_files'] is defined
- name: Generate featureset overriding file
template:
src: templates/featureset-override.j2