From cfa266a3a2fd2f29ba48ecb93018197af5510649 Mon Sep 17 00:00:00 2001 From: Andriy Kurilin Date: Tue, 17 Sep 2024 13:49:32 +0200 Subject: Allow to use configure_user macro for external templates Commit 79a234239516b94b1b79c7ddafcc4fbe4e3ba155 introduced an ability to build 'in-house'/'not-built-in' projects with Kolla. This commits extends this feature with an ability to use configure_user macro for 'not-built-in' users. The implementation is done the same way as for 'sources', i.e. engine after registers new section structure as soon as it finds unknown '-user' section. In addition, the documentation and CI are extended to cover ``--docker-dir`` option. Change-Id: I690d9f3829083f2493bf286a1c45764b9699219b --- kolla/template/methods.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'kolla/template/methods.py') diff --git a/kolla/template/methods.py b/kolla/template/methods.py index 6747504fa..e9edbfeb0 100644 --- a/kolla/template/methods.py +++ b/kolla/template/methods.py @@ -11,6 +11,8 @@ # limitations under the License. import os +import typing as t + import yaml from jinja2 import pass_context @@ -150,3 +152,7 @@ def handle_repos(context, reponames, mode): commands = "RUN %s" % commands return commands + + +def raise_error(msg: str) -> t.NoReturn: + raise Exception(msg) -- cgit v1.2.3