kolla/roles/kolla-build-config/templates/kolla-build.conf.j2
Mark Goddard 6bfe9b8749 [CI] Support building source images with in-review changes
Following this change it is possible to add 'Depends-On' lines to a
kolla commit message that point to reviews in other projects. For
example, this could be used to test building and deploying container
images containing a change to the nova project that is currently in
review.

It also allows to introduce jobs testing against Kolla in other
projects.

The kolla-build-config Ansible role can also be used by other projects,
such as kolla-ansible, to generate the necessary configuration.

This takes us closer to the Kolla Builder - Next Generation concept [1].

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014255.html

Change-Id: Ia2efa6b5d7278b75ab8dec23207f92d6bd7c58f0
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2020-09-16 07:39:41 +00:00

28 lines
815 B
Django/Jinja

{# Generate requested sections and options #}
{% for section_name, section in kolla_build_config.items() %}
[{{ section_name }}]
{% for option_name, option in section.items() %}
{{ option_name }} = {{ option }}
{% endfor %}
{% endfor %}
{# Generate a section for every build source for which there is a Zuul change. #}
{% for zuul_item in zuul['items'] %}
{% if zuul_item.project.name in kolla_build_sources %}
{% set source_names = kolla_build_sources[zuul_item.project.name] %}
{% if source_names is string %}
[{{ source_names }}]
type = local
location = {{ ansible_env.PWD ~ '/' ~ zuul_item.project.src_dir }}
{% else %}
{% for source_name in source_names %}
[{{ source_name }}]
type = local
location = {{ ansible_env.PWD ~ '/' ~ zuul_item.project.src_dir }}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}