diff options
| author | Zuul <zuul@review.opendev.org> | 2020-01-28 18:09:31 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-01-28 18:09:31 +0000 |
| commit | d1564384e313172937ce7d30b84752e41fd66a5e (patch) | |
| tree | ab28811b3b16028abbb4704c06aa41398d992c67 | |
| parent | 2fdc76124ccf47823e1a0f665ce1d278e5a131f5 (diff) | |
| parent | e22c529166f78e79760aeb0cc3b4ab33dd3b6f9c (diff) | |
| download | kolla-d1564384e313172937ce7d30b84752e41fd66a5e.tar.gz kolla-d1564384e313172937ce7d30b84752e41fd66a5e.zip | |
Merge "Add new option to enable unbuildable images"
| -rwxr-xr-x | kolla/common/config.py | 4 | ||||
| -rwxr-xr-x | kolla/image/build.py | 8 | ||||
| -rw-r--r-- | releasenotes/notes/new-kolla-options-e8e32357786e8454.yaml | 14 |
3 files changed, 22 insertions, 4 deletions
diff --git a/kolla/common/config.py b/kolla/common/config.py index 9c95de302..ce6be6e15 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -258,7 +258,9 @@ _CLI_OPTS = [ cfg.BoolOpt('docker-healthchecks', default=True, help='Add Kolla docker healthcheck scripts in the image'), cfg.BoolOpt('quiet', short='q', default=False, - help='Do not print image logs') + help='Do not print image logs'), + cfg.BoolOpt('enable-unbuildable', default=False, + help='Enable images marked as unbuildable') ] _BASE_OPTS = [ diff --git a/kolla/image/build.py b/kolla/image/build.py index bb9012f42..60625409e 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -1061,9 +1061,11 @@ class KollaWorker(object): self.base_arch) tag_re = re.compile(r'^%s(\+%s)*$' % (tag_element, tag_element)) unbuildable_images = set() - for set_tag in UNBUILDABLE_IMAGES: - if tag_re.match(set_tag): - unbuildable_images.update(UNBUILDABLE_IMAGES[set_tag]) + + if not self.conf.enable_unbuildable: + for set_tag in UNBUILDABLE_IMAGES: + if tag_re.match(set_tag): + unbuildable_images.update(UNBUILDABLE_IMAGES[set_tag]) if unbuildable_images: for image in self.images: diff --git a/releasenotes/notes/new-kolla-options-e8e32357786e8454.yaml b/releasenotes/notes/new-kolla-options-e8e32357786e8454.yaml new file mode 100644 index 000000000..966d74215 --- /dev/null +++ b/releasenotes/notes/new-kolla-options-e8e32357786e8454.yaml @@ -0,0 +1,14 @@ +--- +features: + - | + Adds `--enable-unbuildable` options to ignore internal list of unbuildable + images. It is useful in two situations: building for new + distribution/architecture or generation of templates (with + '--templates-only' option) when all templates are needed no matter being + buildable or not. + +upgrade: + - | + The way of generating templates (with '--templates-only' option) is changed. + By default only buildable ones are generated. If all templates are needed + then '--enable-unbuildable' option must be used. |
