From 2bb0dcb5b03d0da091606e1d8d24418ebeac9d0f Mon Sep 17 00:00:00 2001
From: Pete Birley <pete@port.direct>
Date: Sat, 22 Jun 2019 07:44:11 -0500
Subject: [PATCH] Gate: Simpler multiple distro/over-ride support

This PS indroduces a simpler way to incorp over-rides into gate
runs, and also ensures that they are scoped to a single chart, rather
than all of the charts deployed within a gate run.

Change-Id: Iba80f645f33c6d5847fbbb28ce66ee3d23e4fce8
Signed-off-by: Pete Birley <pete@port.direct>
---
 roles/osh-run-script/defaults/main.yaml | 17 +++++++++++++++++
 roles/osh-run-script/tasks/main.yaml    | 10 ++++------
 2 files changed, 21 insertions(+), 6 deletions(-)
 create mode 100644 roles/osh-run-script/defaults/main.yaml

diff --git a/roles/osh-run-script/defaults/main.yaml b/roles/osh-run-script/defaults/main.yaml
new file mode 100644
index 000000000..f84fb778a
--- /dev/null
+++ b/roles/osh-run-script/defaults/main.yaml
@@ -0,0 +1,17 @@
+# 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.
+
+osh_params:
+  openstack_release: newton
+  container_distro_name: ubuntu
+  container_distro_version: xenial
+  #feature_gates:
diff --git a/roles/osh-run-script/tasks/main.yaml b/roles/osh-run-script/tasks/main.yaml
index 8211f70ba..a64ed1737 100644
--- a/roles/osh-run-script/tasks/main.yaml
+++ b/roles/osh-run-script/tasks/main.yaml
@@ -19,11 +19,9 @@
   environment:
     zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
     OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
-    OSH_VALUES_OVERRIDES_HELM_ARGS: >
-      {% if values_overrides is defined %}
-      {% for value_override in values_overrides %}
-        --values={{ value_override }}
-      {% endfor %}
-      {% endif %}
     OSH_PATH: "{{ zuul_osh_relative_path | default('../openstack-helm/') }}"
     OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('../openstack-helm-infra/') }}"
+    OPENSTACK_RELEASE: "{{ osh_params.openstack_release }}"
+    CONTAINER_DISTRO_NAME: "{{ osh_params.container_distro_name }}"
+    CONTAINER_DISTRO_VERSION: "{{ osh_params.container_distro_version }}"
+    FEATURE_GATES: "{{ osh_params.feature_gates | default('') }}"