From fa2e1304362d3b81b9903b77d180aa2eb3f1af8b Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 17 Dec 2019 08:47:42 +0100 Subject: build: list only buildable templates for --template-only TripleO uses --template-only to generate Dockerfiles and then use buildah to create container images. But as Kolla generates all files then they need to have a way to exclude not buildable ones. https://review.opendev.org/#/c/699024 is one of such attempts. But if we remove not buildable Dockerfiles then they get what they can build. Change-Id: I7a92b762f6a783f92ebca61e5595e1422a92df4f --- kolla/image/build.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kolla/image/build.py b/kolla/image/build.py index 9108fe5e4..a6cc4719e 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -1433,6 +1433,16 @@ def run_build(): kolla.create_dockerfiles() if conf.template_only: + kolla.build_image_list() + kolla.find_parents() + kolla.filter_images() + + for image in kolla.images: + if image.status == STATUS_MATCHED: + continue + + shutil.rmtree(image.path) + LOG.info('Dockerfiles are generated in %s', kolla.working_dir) return -- cgit v1.2.3