From a4e805fd5b2bad1ac5af0edcaf44db9d287f079e Mon Sep 17 00:00:00 2001 From: Marios Andreou Date: Fri, 16 Nov 2018 17:42:26 +0200 Subject: [PATCH] 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 Change-Id: If36d96a96d98b63881ee096eaae54ffc60b6ecf1 --- playbooks/tripleo-ci/run-v3.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/playbooks/tripleo-ci/run-v3.yaml b/playbooks/tripleo-ci/run-v3.yaml index c7c0694fc..8fe3f53fb 100644 --- a/playbooks/tripleo-ci/run-v3.yaml +++ b/playbooks/tripleo-ci/run-v3.yaml @@ -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