aboutsummaryrefslogtreecommitdiff
path: root/roles/kolla-build-config/templates/kolla-build.conf.j2
blob: bfc5dd4264036a521ff697d79e77d9a9bf143aa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{# 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 %}