Skip to content

Commit a51deb4

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[CI] Support building source images with in-review changes" into stable/ussuri
2 parents 7cfb5b4 + 9389ac1 commit a51deb4

File tree

5 files changed

+191
-22
lines changed

5 files changed

+191
-22
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
# Path to the kolla config file.
3+
kolla_build_config_path: /etc/kolla/kolla-build.conf
4+
5+
# Dict of configuration to add to kolla-build.conf.
6+
# Format:
7+
# kolla_build_config:
8+
# "section":
9+
# "option name": "option value"
10+
kolla_build_config: {}
11+
12+
# Dict mapping project names to sections in kolla-build.conf.
13+
kolla_build_sources:
14+
openstack/requirements: openstack-base
15+
16+
openstack/aodh: aodh-base
17+
openstack/barbican: barbican-base
18+
openstack/bifrost: bifrost-base
19+
openstack/blazar: blazar-base
20+
openstack/blazar-nova: nova-base-plugin-blazar
21+
openstack/ceilometer: ceilometer-base
22+
openstack/cinder: cinder-base
23+
openstack/cloudkitty: cloudkitty-base
24+
openstack/designate: designate-base
25+
openstack/ec2-api: ec2-api
26+
openstack/freezer: freezer-base
27+
openstack/freezer-api: freezer-api
28+
openstack/glance: glance-base
29+
openstack/gnocchi: gnocchi-base
30+
openstack/heat: heat-base
31+
openstack/ironic: ironic-base
32+
openstack/ironic-inspector: ironic-inspector
33+
openstack/karbor: karbor-base
34+
openstack/keystone: keystone-base
35+
openstack/kuryr: kuryr-base
36+
openstack/kuryr-libnetwork: kuryr-libnetwork
37+
openstack/magnum: magnum-base
38+
openstack/manila: manila-base
39+
openstack/mistral: mistral-base
40+
openstack/monasca-agent: monasca-agent
41+
openstack/monasca-api: monasca-api
42+
openstack/monasca-notification: monasca-notification
43+
openstack/monasca-persister: monasca-persister
44+
openstack/monasca-statsd: monasca-statsd
45+
openstack/monasca-common: monasca-thresh-additions-monasca-common
46+
openstack/murano: murano-base
47+
openstack/neutron: neutron-base
48+
openstack/networking-ansible: neutron-base-plugin-networking-ansible
49+
openstack/networking-baremetal: neutron-base-plugin-networking-baremetal
50+
openstack/neutron-dynamic-routing:
51+
- neutron-bgp-dragent
52+
- neutron-server-plugin-neutron-dynamic-routing
53+
openstack/networking-infoblox: neutron-server-plugin-networking-infoblox
54+
openstack/networking-generic-switch: neutron-base-plugin-networking-generic-switch
55+
openstack/networking-sfc:
56+
- neutron-base-plugin-networking-sfc
57+
- tacker-base-plugin-networking-sfc
58+
openstack/vmware-nsx: neutron-base-plugin-vmware-nsx
59+
openstack/vmware-nsxlib: neutron-server-plugin-vmware-nsxlib
60+
openstack/neutron-vpnaas:
61+
- neutron-vpnaas-agent
62+
- neutron-base-plugin-vpnaas-agent
63+
openstack/nova: nova-base
64+
openstack/nova-mksproxy: nova-base-plugin-mksproxy
65+
openstack/novajoin: novajoin-base
66+
openstack/octavia: octavia-base
67+
openstack/panko:
68+
- ceilometer-base-plugin-panko
69+
- panko-base
70+
openstack/rally: rally
71+
openstack/sahara: sahara-base
72+
openstack/searchlight: searchlight-base
73+
openstack/senlin: senlin-base
74+
openstack/solum: solum-base
75+
swift-base: openstack/swift
76+
openstack/tacker:
77+
- tacker-base
78+
- mistral-base-plugin-tacker
79+
openstack/trove: trove-base
80+
openstack/vitrage: vitrage-base
81+
openstack/vmtp: vmtp
82+
openstack/watcher: watcher-base
83+
openstack/zaqar: zaqar
84+
openstack/zun: zun-base
85+
86+
# Horizon and its plugins
87+
openstack/horizon: horizon
88+
openstack/blazar-dashboard: horizon-plugin-blazar-dashboard
89+
openstack/cloudkitty-dashboard: horizon-plugin-cloudkitty-dashboard
90+
openstack/designate-dashboard: horizon-plugin-designate-dashboard
91+
openstack/freezer-web-ui: horizon-plugin-freezer-web-ui
92+
openstack/heat-dashboard: horizon-plugin-heat-dashboard
93+
openstack/ironic-ui: horizon-plugin-ironic-ui
94+
openstack/karbor-dashboard: horizon-plugin-karbor-dashboard
95+
openstack/magnum-ui: horizon-plugin-magnum-ui
96+
openstack/manila-ui: horizon-plugin-manila-ui
97+
openstack/mistral-dashboard: horizon-plugin-mistral-dashboard
98+
openstack/monasca-ui: horizon-plugin-monasca-ui
99+
openstack/murano-dashboard: horizon-plugin-murano-dashboard
100+
openstack/neutron-vpnaas-dashboard: horizon-plugin-neutron-vpnaas-dashboard
101+
openstack/octavia-dashboard: horizon-plugin-octavia-dashboard
102+
openstack/sahara-dashboard: horizon-plugin-sahara-dashboard
103+
openstack/searchlight-ui: horizon-plugin-searchlight-ui
104+
openstack/senlin-dashboard: horizon-plugin-senlin-dashboard
105+
openstack/solum-dashboard: horizon-plugin-solum-dashboard
106+
openstack/tacker-horizon: horizon-plugin-tacker-dashboard
107+
openstack/trove-dashboard: horizon-plugin-trove-dashboard
108+
openstack/vitrage-dashboard: horizon-plugin-vitrage-dashboard
109+
openstack/watcher-dashboard: horizon-plugin-watcher-dashboard
110+
openstack/zaqar-ui: horizon-plugin-zaqar-ui
111+
openstack/zun-ui: horizon-plugin-zun-ui
112+
113+
# Tempest and its plugins
114+
openstack/tempest: tempest
115+
openstack/patrole: tempest-plugin-patrole
116+
openstack/python-tempestconf: tempest-plugin-tempest-conf
117+
openstack/barbican-tempest-plugin: tempest-plugin-barbican
118+
openstack/blazar-tempest-plugin: tempest-plugin-blazar
119+
openstack/cinder-tempest-plugin: tempest-plugin-cinder
120+
openstack/ec2api-tempest-plugin: tempest-plugin-ec2api
121+
openstack/heat-tempest-plugin: tempest-plugin-heat
122+
openstack/ironic-tempest-plugin: tempest-plugin-ironic
123+
openstack/keystone-tempest-plugin: tempest-plugin-keystone
124+
openstack/magnum-tempest-plugin: tempest-plugin-magnum
125+
openstack/manila-tempest-plugin: tempest-plugin-manila
126+
openstack/mistral-tempest-plugin: tempest-plugin-mistral
127+
openstack/monasca-tempest-plugin: tempest-plugin-monasca
128+
openstack/murano-tempest-plugin: tempest-plugin-murano
129+
openstack/neutron-tempest-plugin: tempest-plugin-neutron
130+
openstack/telemetry-tempest-plugin: tempest-plugin-telemetry
131+
openstack/trove-tempest-plugin: tempest-plugin-trove
132+
openstack/vitrage-tempest-plugin: tempest-plugin-vitrage
133+
openstack/watcher-tempest-plugin: tempest-plugin-watcher
134+
openstack/zaqar-tempest-plugin: tempest-plugin-zaqar
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- name: Ensure kolla-build.conf exists
3+
template:
4+
src: kolla-build.conf.j2
5+
dest: "{{ kolla_build_config_path }}"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{# Generate requested sections and options #}
2+
3+
{% for section_name, section in kolla_build_config.items() %}
4+
[{{ section_name }}]
5+
{% for option_name, option in section.items() %}
6+
{{ option_name }} = {{ option }}
7+
{% endfor %}
8+
{% endfor %}
9+
10+
{# Generate a section for every build source for which there is a Zuul change. #}
11+
12+
{% for zuul_item in zuul['items'] %}
13+
{% if zuul_item.project.name in kolla_build_sources %}
14+
{% set source_names = kolla_build_sources[zuul_item.project.name] %}
15+
{% if source_names is string %}
16+
[{{ source_names }}]
17+
type = local
18+
location = {{ ansible_env.PWD ~ '/' ~ zuul_item.project.src_dir }}
19+
{% else %}
20+
{% for source_name in source_names %}
21+
[{{ source_name }}]
22+
type = local
23+
location = {{ ansible_env.PWD ~ '/' ~ zuul_item.project.src_dir }}
24+
{% endfor %}
25+
{% endif %}
26+
{% endif %}
27+
{% endfor %}

tests/playbooks/run.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
- hosts: all
33
vars_files:
44
- ../vars/zuul.yml
5+
vars:
6+
tag_suffix: "{{ '-aarch64' if ansible_architecture == 'aarch64' else '' }}"
7+
kolla_build_config:
8+
DEFAULT:
9+
debug: true
10+
logs_dir: "{{ kolla_build_logs_dir }}"
11+
base: "{{ base_distro }}"
12+
install_type: "{{ install_type }}"
13+
template_override: /etc/kolla/template_overrides.j2
14+
# NOTE(yoctozepto): to avoid issues with IPv6 not enabled in the docker daemon
15+
# and since we don't need isolated networks here, use host networking
16+
network_mode: host
517
tasks:
618
- name: Ensure /etc/kolla exists
719
file:
@@ -10,10 +22,19 @@
1022
mode: 0777
1123
become: true
1224

13-
- name: Template kolla-build.conf
14-
template:
15-
src: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/tests/templates/kolla-build.conf.j2"
16-
dest: /etc/kolla/kolla-build.conf
25+
- name: Add publisher config
26+
vars:
27+
kolla_publisher_config:
28+
DEFAULT:
29+
namespace: "{{ kolla_namespace }}"
30+
tag: "{{ (zuul.tag if zuul.pipeline == 'release' else zuul.branch | basename) ~ tag_suffix }}"
31+
set_fact:
32+
kolla_build_config: "{{ kolla_build_config | combine(kolla_publisher_config, recursive=True) }}"
33+
when:
34+
- publisher
35+
36+
- import_role:
37+
name: kolla-build-config
1738

1839
- name: Template template_overrides.j2
1940
template:

tests/templates/kolla-build.conf.j2

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)