Merge "Fix container image build with multiple regexes"

This commit is contained in:
Zuul 2019-10-02 15:26:47 +00:00 committed by Gerrit Code Review
commit dea732e7d5
3 changed files with 11 additions and 4 deletions

View File

@ -740,7 +740,7 @@ class SeedContainerImageBuild(KayobeAnsibleMixin, VaultMixin, Command):
"container-image-build")
extra_vars = {"push_images": parsed_args.push}
if parsed_args.regex:
regexes = "'%s'" % " ".join(parsed_args.regex)
regexes = " ".join(parsed_args.regex)
extra_vars["container_image_regexes"] = regexes
else:
extra_vars["container_image_sets"] = (
@ -1422,7 +1422,7 @@ class OvercloudContainerImageBuild(KayobeAnsibleMixin, VaultMixin, Command):
"container-image-build")
extra_vars = {"push_images": parsed_args.push}
if parsed_args.regex:
regexes = "'%s'" % " ".join(parsed_args.regex)
regexes = " ".join(parsed_args.regex)
extra_vars["container_image_regexes"] = regexes
else:
extra_vars["container_image_sets"] = (

View File

@ -829,7 +829,7 @@ class TestCase(unittest.TestCase):
"ansible", "container-image-build.yml")
],
extra_vars={
"container_image_regexes": "'^regex1$ ^regex2$'",
"container_image_regexes": "^regex1$ ^regex2$",
"push_images": True,
}
),
@ -1781,7 +1781,7 @@ class TestCase(unittest.TestCase):
"ansible", "container-image-build.yml")
],
extra_vars={
"container_image_regexes": "'^regex1$ ^regex2$'",
"container_image_regexes": "^regex1$ ^regex2$",
"push_images": True,
}
),

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixes an issue when specifying multiple regular expressions to the ``kayobe
seed container image build`` and ``kayobe overcloud container image build``
commands. See `story 2006475
<https://storyboard.openstack.org/#!/story/2006475>`__ for details.