aboutsummaryrefslogtreecommitdiff
path: root/kolla/template/methods.py
diff options
context:
space:
mode:
authorAndriy Kurilin <andr.kurilin@gmail.com>2024-09-17 13:49:32 +0200
committerAndriy Kurilin <andr.kurilin@gmail.com>2025-02-18 09:41:17 +0100
commitcfa266a3a2fd2f29ba48ecb93018197af5510649 (patch)
tree364717d58c985a4db60cd87a2bbbdfb221bec757 /kolla/template/methods.py
parent2941ea2c7a89c1852a943aed820a45fd9c4e05b7 (diff)
downloadkolla-cfa266a3a2fd2f29ba48ecb93018197af5510649.tar.gz
kolla-cfa266a3a2fd2f29ba48ecb93018197af5510649.zip
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 '<project>-user' section. In addition, the documentation and CI are extended to cover ``--docker-dir`` option. Change-Id: I690d9f3829083f2493bf286a1c45764b9699219b
Diffstat (limited to 'kolla/template/methods.py')
-rw-r--r--kolla/template/methods.py6
1 files changed, 6 insertions, 0 deletions
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)