Add monasca to image regex list

Without this monasca images are not built unless explicitly requested.

Monasca images only support the kolla source type, not binary.

Also fixes image builds if the list of regular expressions for an image
build set is empty, kolla will build all images. In our case we actually
want to build none, since it means that no services are enabled for that
image set. The main example of where this could happen is when monasca
is disabled, the list of source-only images will be empty.

Change-Id: I395e73a06b690d4b443af7c5eb8827514f56d03d
TrivialFix
This commit is contained in:
Mark Goddard 2018-08-31 09:11:29 +01:00
parent 1ee04846f6
commit a1ea2cc753
2 changed files with 15 additions and 0 deletions

View File

@ -53,3 +53,4 @@
{% if push_images | bool %}--push{% endif %} \ {% if push_images | bool %}--push{% endif %} \
{{ item.regexes }} 2>&1 | tee --append {{ kolla_build_log_path }} {{ item.regexes }} 2>&1 | tee --append {{ kolla_build_log_path }}
with_items: "{{ container_image_sets }}" with_items: "{{ container_image_sets }}"
when: item.regexes != ''

View File

@ -204,10 +204,24 @@ overcloud_container_image_regex_map:
# overcloud hosts. # overcloud hosts.
overcloud_container_image_regexes: "{{ overcloud_container_image_regex_map | selectattr('enabled') | map(attribute='regex') | list }}" overcloud_container_image_regexes: "{{ overcloud_container_image_regex_map | selectattr('enabled') | map(attribute='regex') | list }}"
# List of regular expressions matching names of container images to build for
# overcloud hosts. These images only support source builds.
overcloud_container_image_regex_map_source:
- regex: monasca
enabled: "{{ kolla_enable_monasca | bool }}"
# List of regular expressions matching names of container images to build for
# overcloud hosts. These images onlt support source builds.
overcloud_container_image_regexes_source: "{{ overcloud_container_image_regex_map_source | selectattr('enabled') | map(attribute='regex') | list }}"
# List of container image sets for overcloud hosts. This is used when building # List of container image sets for overcloud hosts. This is used when building
# container images to determine which images to build. # container images to determine which images to build.
overcloud_container_image_sets: overcloud_container_image_sets:
# Default image type.
- regexes: "{{ overcloud_container_image_regexes | join(' ') }}" - regexes: "{{ overcloud_container_image_regexes | join(' ') }}"
# Source-only images.
- regexes: "{{ overcloud_container_image_regexes_source | join(' ') }}"
type: source
# Dict mapping Jinja2 block names in kolla's Docker images to their contents. # Dict mapping Jinja2 block names in kolla's Docker images to their contents.
kolla_build_blocks: {} kolla_build_blocks: {}