openstack-helm-images/zuul.d/playbooks/build-openstack.yml

54 lines
1.8 KiB
YAML

---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: all[0]
gather_facts: true
vars_files:
- vars-openstack.yml
vars:
docker_images: "{{ openstack_docker_images | map('extract', openstack_docker_images_dict) | list }}"
pre_tasks:
- name: Use buildset registry
include_role:
name: use-buildset-registry
tasks:
- name: define wheels location
set_fact:
wheels_location: "{{ buildset_registry_alias }}:{{ buildset_registry.port }}/{{ requirements_repository }}:{{ shortbranchname }}-{{ distroname }}"
- name: Build base image
include_role:
name: build-docker-image
vars:
zuul_work_dir: "{{ zuul.project.src_dir }}"
docker_images: "{{ base_docker_images }}"
- name: Build base requirements image
include_role:
name: build-docker-image
vars:
zuul_work_dir: "src/opendev.org/openstack/loci"
docker_images: "{{ requirements_docker_images }}"
- name: Build project images
include_role:
name: build-docker-image
vars:
zuul_work_dir: "src/opendev.org/openstack/loci"
# - name: Return images to zuul
# include_tasks: _return-image.yml
# loop: "{{ docker_images }}"
# loop_control:
# loop_var: zj_image