Fix image registry conditional

`kolla_docker_registry` evaluates to an empty string if neither
a docker or podman registry are configured. This leads to broken
behaviour if an image build is attempted with a regex specified.

Closes-bug: #2112646

Change-Id: I4548410d533731138de02780dc8b2013e71730d0
This commit is contained in:
Doug Szumski
2025-06-06 14:59:28 +01:00
parent 9554ddd2d3
commit 8f0c9a7ec7
2 changed files with 6 additions and 1 deletions

View File

@@ -53,7 +53,7 @@
kolla-build
--config-dir {{ kolla_build_config_path }}
--engine {{ container_engine }}
{% if kolla_docker_registry is not none %}--registry {{ kolla_docker_registry }}{% endif %}
{% if kolla_docker_registry %}--registry {{ kolla_docker_registry }}{% endif %}
{% if push_images | bool %}--push{% endif %}
{% if nocache | bool %}--nocache{% endif %}
{% if kolla_base_arch != ansible_facts.architecture %}--platform {{ platform }}{% endif %}

View File

@@ -0,0 +1,5 @@
---
fixes:
- |
Fixes an issue building images with a regex when no image registry is set
`LP#2112646 <https://bugs.launchpad.net/kayobe/+bug/2112646>`__