From 8f0c9a7ec718cd1cf5a2ffd230e0c99c36822af9 Mon Sep 17 00:00:00 2001 From: Doug Szumski Date: Fri, 6 Jun 2025 14:59:28 +0100 Subject: [PATCH] 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 --- ansible/container-image-build.yml | 2 +- releasenotes/notes/fix-empty-registry-bug.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-empty-registry-bug.yaml diff --git a/ansible/container-image-build.yml b/ansible/container-image-build.yml index 16e4f8071..026c5cec7 100644 --- a/ansible/container-image-build.yml +++ b/ansible/container-image-build.yml @@ -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 %} diff --git a/releasenotes/notes/fix-empty-registry-bug.yaml b/releasenotes/notes/fix-empty-registry-bug.yaml new file mode 100644 index 000000000..8efe04310 --- /dev/null +++ b/releasenotes/notes/fix-empty-registry-bug.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes an issue building images with a regex when no image registry is set + `LP#2112646 `__