From bde0d0084ce37a4e66f74e1c2164eaea06cb3b51 Mon Sep 17 00:00:00 2001 From: Wes Hayutin Date: Mon, 27 Jul 2020 16:38:45 -0600 Subject: [PATCH] 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 This change updates the release vars to to switch it on for master. By default in standalone role master and ussuri will build locally. Depends-On: https://review.opendev.org/#/c/743691/ Partial-Bug: #1889122 Change-Id: I32793b94525ece1e64f7924f3f29a7dc2655a588 --- config/release/tripleo-ci/CentOS-8/master.yml | 15 ++++++++++++++- config/release/tripleo-ci/CentOS-8/ussuri.yml | 10 +++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/config/release/tripleo-ci/CentOS-8/master.yml b/config/release/tripleo-ci/CentOS-8/master.yml index 94c284cd0..6863d361e 100644 --- a/config/release/tripleo-ci/CentOS-8/master.yml +++ b/config/release/tripleo-ci/CentOS-8/master.yml @@ -6,7 +6,20 @@ distro_ver: centos8 distro_deps_repo_name: deps dlrn_hash_tag: current-tripleo dlrn_hash_tag_newest: current -docker_registry_host: "{{ job.build_container_images|default(false)|bool | ternary('127.0.0.1:5001', 'docker.io') }}" + +# job.build_container_images is defined in zuul as a +# direct var. adding build_container_images as tqe +# var so that we can turn this on/off per release w/o +# changing zuul and breaking jobs via inheritance. +docker_registry_host: >- + {% if job is defined and + job.build_container_images is defined and + job.build_container_images|default(false)|bool or + build_container_images|default(false)|bool -%} + 127.0.0.1:5001 + {%- else -%} + docker.io + {%- endif -%} docker_registry_namespace: "tripleo{{ release }}" docker_image_tag: "{{ dlrn_hash|default(dlrn_hash_tag) }}" docker_openshift_tag: v3.11.0 diff --git a/config/release/tripleo-ci/CentOS-8/ussuri.yml b/config/release/tripleo-ci/CentOS-8/ussuri.yml index ce260069a..3388ab94a 100644 --- a/config/release/tripleo-ci/CentOS-8/ussuri.yml +++ b/config/release/tripleo-ci/CentOS-8/ussuri.yml @@ -6,7 +6,15 @@ distro_ver: centos8 distro_deps_repo_name: deps dlrn_hash_tag: current-tripleo dlrn_hash_tag_newest: current -docker_registry_host: "{{ job.build_container_images|default(false)|bool | ternary('127.0.0.1:5001', 'docker.io') }}" +docker_registry_host: >- + {% if job is defined and + job.build_container_images is defined and + job.build_container_images|default(false)|bool or + build_container_images|default(false)|bool -%} + 127.0.0.1:5001 + {%- else -%} + docker.io + {%- endif -%} # note.. namespace tripleoussuri has been # squatted on by another owner # for ussuri release please use 'tripleou'