Merge "Allow to build containers before undercloud-install"

This commit is contained in:
Zuul 2021-10-26 15:14:07 +00:00 committed by Gerrit Code Review
commit 83068a1c59
4 changed files with 25 additions and 1 deletions

View File

@ -63,6 +63,7 @@
when:
- update_containers_append_tag is undefined
- (update_containers is defined and update_containers|bool) or (standalone_container_prep_updates is defined and standalone_container_prep_updates|bool)
- not build_container_images|default(false)|bool
- not job.consumer_job | default(false) | bool
tags:
- undercloud-install

View File

@ -50,6 +50,15 @@
include_role:
name: validate-perf
- name: Build and push containers into a local registry
when:
- build_container_images|default(false)|bool
include_role:
name: container-build
vars:
container_registry_namespace: "{{ docker_registry_namespace }}"
container_tag: "{{ container_build_id }}"
- name: Install undercloud
collections:
- tripleo.operator

View File

@ -1,6 +1,9 @@
parameter_defaults:
DockerInsecureRegistryAddress:
- {{ local_docker_registry_host }}:8787
{% if build_container_images|default(false)|bool or job.consumer_job|default(false)|bool %}
- {{ local_registry_ip }}:{{ local_registry_port }}
{% endif %}
{% if job.consumer_job | default(false) | bool %}
- {{ job.registry_ip_address_branch[release] }}:{{ local_registry_port }}
{% else %}
@ -10,10 +13,15 @@ parameter_defaults:
DockerRegistryMirror: {{ undercloud_docker_registry_mirror }}
{% endif %}
ContainerImagePrepare:
{% if not build_container_images|default(false)|bool %}
- push_destination: "{{ local_docker_registry_host }}:8787"
{% else %}
- push_destination: false
{% endif %}
{% if update_containers|bool
and not use_overcloud_mixed_upgrade|default(false)|bool
and not job.consumer_job | default(false) | bool %}
and not job.consumer_job | default(false) | bool
and not build_container_images|default(false)|bool %}
modify_role: tripleo-modify-image
modify_append_tag: "{{ update_containers_append_tag }}"
{% if release in ['stein'] %}

View File

@ -346,6 +346,12 @@ container_images_file = {{ working_dir }}/containers-prepare-parameter.yaml
#container_images_file = <None>
{% endif %}
{% if build_container_images|default(false)|bool %}
container_insecure_registries = {{ local_registry_ip }}:{{ local_registry_port }}
{% else %}
#container_insecure_registries =
{% endif %}
{% if undercloud_custom_env_files is defined %}
custom_env_files = {{ undercloud_custom_env_files.split()|join(',') }}
{% else %}