6bfe9b8749
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>
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
---
|
|
- hosts: all
|
|
vars_files:
|
|
- ../vars/zuul.yml
|
|
vars:
|
|
tag_suffix: "{{ '-aarch64' if ansible_architecture == 'aarch64' else '' }}"
|
|
kolla_build_config:
|
|
DEFAULT:
|
|
debug: true
|
|
logs_dir: "{{ kolla_build_logs_dir }}"
|
|
base: "{{ base_distro }}"
|
|
install_type: "{{ install_type }}"
|
|
template_override: /etc/kolla/template_overrides.j2
|
|
# NOTE(yoctozepto): to avoid issues with IPv6 not enabled in the docker daemon
|
|
# and since we don't need isolated networks here, use host networking
|
|
network_mode: host
|
|
tasks:
|
|
- name: Ensure /etc/kolla exists
|
|
file:
|
|
path: /etc/kolla
|
|
state: directory
|
|
mode: 0777
|
|
become: true
|
|
|
|
- name: Add publisher config
|
|
vars:
|
|
kolla_publisher_config:
|
|
DEFAULT:
|
|
namespace: kolla
|
|
tag: "{{ (zuul.tag if zuul.pipeline == 'release' else zuul.branch | basename) ~ tag_suffix }}"
|
|
set_fact:
|
|
kolla_build_config: "{{ kolla_build_config | combine(kolla_publisher_config, recursive=True) }}"
|
|
when:
|
|
- publisher
|
|
|
|
- import_role:
|
|
name: kolla-build-config
|
|
|
|
- name: Template template_overrides.j2
|
|
template:
|
|
src: "{{ zuul.executor.work_root }}/{{ zuul.project.src_dir }}/tests/templates/template_overrides.j2"
|
|
dest: /etc/kolla/template_overrides.j2
|
|
|
|
- name: Run kolla-build
|
|
command: "{{ virtualenv_path }}/bin/kolla-build"
|