diff options
author | Tim Rozet <trozet@redhat.com> | 2017-12-04 11:20:23 -0500 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2018-03-16 14:51:33 -0400 |
commit | f6dbb3929d904b4d5a9ee01f8270051e29ac1ec3 (patch) | |
tree | f2490665c2febe0ebc463714f5375483bfca9710 /apex/build_utils.py | |
parent | a008f8394e07f1b82d5bf7288f46c63252f6084f (diff) |
Enables containerized overcloud deployments
Changes Include:
- For upstream deployments, Docker local registry will be updated with
latest current RDO containers, regular deployments will use latest
stable
- Upstream container images will then be patched/modified and then
re-uploaded into local docker registry with 'apex' tag
- Deployment command modified to deploy with containers
- Adds a --no-fetch deployment argument to disable pulling latest
from upstream, and instead using what already exists in cache
- Moves Undercloud NAT setup to just after undercloud is installed.
This provides internet during overcloud install which is now
required for upstream container deployments.
- Creates loop device for Ceph deployment when no device is
provided in deploy settings (for container deployment only)
- Updates NIC J2 template to use the new format in OOO since
the os-apply-config method is now deprecated in > Queens
JIRA: APEX-566
JIRA: APEX-549
Change-Id: I0652c194c059b915a942ac7401936e8f5c69d1fa
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/build_utils.py')
-rw-r--r-- | apex/build_utils.py | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/apex/build_utils.py b/apex/build_utils.py index c9d8472e..1c413dfd 100644 --- a/apex/build_utils.py +++ b/apex/build_utils.py @@ -90,6 +90,31 @@ def clone_fork(args): logging.info('Checked out commit:\n{}'.format(ws.head.commit.message)) +def strip_patch_sections(patch, sections=['releasenotes']): + """ + Removes patch sections from a diff which contain a file path + :param patch: patch to strip + :param sections: list of keywords to use to strip out of the patch file + :return: stripped patch + """ + + append_line = True + tmp_patch = [] + for line in patch.split("\n"): + if re.match('diff\s', line): + for section in sections: + if re.search(section, line): + logging.debug("Stripping {} from patch: {}".format( + section, line)) + append_line = False + break + else: + append_line = True + if append_line: + tmp_patch.append(line) + return '\n'.join(tmp_patch) + + def get_patch(change_id, repo, branch, url=con.OPENSTACK_GERRIT): logging.info("Fetching patch for change id {}".format(change_id)) change = get_change(url, repo, branch, change_id) @@ -100,7 +125,7 @@ def get_patch(change_id, repo, branch, url=con.OPENSTACK_GERRIT): change_id) patch_url = "changes/{}/revisions/{}/patch".format(change_path, current_revision) - return rest.get(patch_url) + return strip_patch_sections(rest.get(patch_url)) def get_parser(): |