summaryrefslogtreecommitdiffstats
path: root/apex/builders
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-08-21 09:19:57 -0400
committerTim Rozet <trozet@redhat.com>2018-09-27 22:03:57 -0400
commitee58a24647df8eec2418735b038e5035bdffe10d (patch)
treee54a9a9293f94c1fc185d33554a3328068f23fae /apex/builders
parent82bf9da27ea0c973068720d440e3391084e8a9d9 (diff)
Enable OVN scenarios
As of Queens only HA OVN deployments are supported. Change-Id: I184c5a096fec9cbc3cf2ec06218700138ea3ed57 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/builders')
-rw-r--r--apex/builders/common_builder.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/apex/builders/common_builder.py b/apex/builders/common_builder.py
index a5f301b8..b8894ec1 100644
--- a/apex/builders/common_builder.py
+++ b/apex/builders/common_builder.py
@@ -25,10 +25,11 @@ from apex.common import utils
from apex.virtual import utils as virt_utils
-def project_to_path(project):
+def project_to_path(project, patch=None):
"""
Translates project to absolute file path to use in patching
:param project: name of project
+ :param patch: the patch to applied to the project
:return: File path
"""
if project.startswith('openstack/'):
@@ -37,6 +38,15 @@ def project_to_path(project):
return "/etc/puppet/modules/{}".format(project.replace('puppet-', ''))
elif 'tripleo-heat-templates' in project:
return "/usr/share/openstack-tripleo-heat-templates"
+ elif ('tripleo-common' in project and
+ build_utils.is_path_in_patch(patch, 'container-images/')):
+ # tripleo-common has python and another component to it
+ # here we detect if there is a change to the yaml component and if so
+ # treat it like it is not python. This has the caveat of if there
+ # is a patch to both python and yaml this will not work
+ # FIXME(trozet): add ability to split tripleo-common patches that
+ # modify both python and yaml
+ return "/usr/share/openstack-tripleo-common-containers/"
else:
# assume python. python patches will apply to a project name subdir.
# For example, python-tripleoclient patch will apply to the
@@ -157,7 +167,7 @@ def add_upstream_patches(patches, image, tmp_dir,
branch = default_branch
patch_diff = build_utils.get_patch(patch['change-id'],
patch['project'], branch)
- project_path = project_to_path(patch['project'])
+ project_path = project_to_path(patch['project'], patch_diff)
# If docker tag and python we know this patch belongs on docker
# container for a docker service. Therefore we build the dockerfile
# and move the patch into the containers directory. We also assume