From acac12798c29ac9a1488a5ad1dc977dc8e0aab34 Mon Sep 17 00:00:00 2001
From: Mark Goddard <mark@stackhpc.com>
Date: Mon, 1 Jul 2019 11:12:58 +0000
Subject: [PATCH] Revert "CI - remove unnecessary logic when building images
 for upgrade"

This reverts commit 8ce5ffd0c21c221d88bacca5fec03ca042dfed85.

Change-Id: I81ce7c007ff267ebbbb721bcdb7eebc0dd575bf8
---
 tests/templates/globals-default.j2 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2
index 7d983d5bbc..4fc5a908a2 100644
--- a/tests/templates/globals-default.j2
+++ b/tests/templates/globals-default.j2
@@ -24,6 +24,11 @@ openstack_release: "{{ build_image_tag }}"
 {% else %}
 # use docker hub images
 docker_namespace: "kolla"
+{% if need_build_image and is_previous_release %}
+# NOTE(mgoddard): Ensure that the insecure local registry is trusted, since it
+# will be the source of images during the upgrade.
+docker_custom_option: "--insecure-registry {{ api_interface_address }}:4000"
+{% endif %}
 {% if not is_previous_release %}
 openstack_release: "{{ zuul.branch | basename }}"
 {% else %}