Merge "Add native variable to locally build containers"

This commit is contained in:
Zuul 2020-11-29 00:34:16 +00:00 committed by Gerrit Code Review
commit 07ee21f9bc
4 changed files with 9 additions and 5 deletions

View File

@ -21,7 +21,7 @@ container_tag: current-tripleo
container_file: /usr/share/openstack-tripleo-common/container-images/tripleo_containers.yaml
# Notes(chandankumar): openstack- prefix is used from victoria release onwards
docker_prep_prefix: >-
{% if (job.build_container_images|default(false)|bool and
{% if (build_container_images|default(false)|bool and
not job.provider_job|default(false)|bool) or
release not in ['queens', 'rocky', 'pike', 'stein', 'train', 'ussuri'] -%}
openstack

View File

@ -47,10 +47,14 @@ docker_registry_host: >-
{%- endif -%}
docker_registry_namespace: "tripleo{{ release }}"
docker_image_tag: current-tripleo
# set default and convert job.build_container_images to native
build_container_images: "{{ job.build_container_images|default(false)|bool }}"
# docker prefix
# Notes(chandankumar): openstack- prefix is used from victoria release onwards
docker_prep_prefix: >-
{% if (job.build_container_images|default(false)|bool and
{% if (build_container_images|default(false)|bool and
not job.provider_job|default(false)|bool) or
release not in ['queens', 'rocky', 'pike', 'stein', 'train', 'ussuri'] -%}
openstack

View File

@ -59,7 +59,7 @@
- name: Build and push containers into a local registry
when:
- job.build_container_images|default(false)|bool
- build_container_images|default(false)|bool
include_role:
name: container-build
vars:
@ -228,7 +228,7 @@
- name: Add updates to container-prepare-parameters.yaml
when:
- standalone_container_prep_updates
- not job.build_container_images|default(false)|bool
- not build_container_images|default(false)|bool
- not job.consumer_job | default(false) | bool
block:
- name: Generate modified containers file

View File

@ -12,7 +12,7 @@ parameter_defaults:
{% if job.consumer_job|default(false)|bool or (standalone_container_prep_updates is defined and standalone_container_prep_updates) %}
DockerInsecureRegistryAddress:
- {{ standalone_ip }}:8787
{% if job.build_container_images|default(false)|bool or job.consumer_job|default(false)|bool %}
{% 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 %}