Add native variable to locally build containers
atm there is an option to turn on local container builds for standalone that is defined in zuul only. ATM we are considering turning this on for all standalone master jobs to reduce the load on docker.io Change-Id: Iad71c1af41b2039591eccdb420c2a35b05ade4ac
This commit is contained in:
parent
6b8bbf8d93
commit
c0278f637b
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue