From 9f9509f07272fa8a8530428ef5d8f36ccd97e41e Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Wed, 7 Oct 2020 11:17:00 +0530 Subject: [PATCH] Honour build_container_images and provider/consumer jobs https://review.opendev.org/#/c/752685 changed all jobs to use trunk.registry.rdoproject.org registry for all rdo third party jobs but in RDO we run jobs that build/deploy containers so we have to use the local registry that is setup in jobs instead of relying on external registeries. This patch ensures correct registeries are used. Change-Id: I9245d4c89e63ec71a102240e9ceaad18b5b14878 --- .../config/testenv/multinode-rdocloud.yml | 16 +++++++++++++++- .../config/testenv/multinode-vexxhost.yml | 16 +++++++++++++++- toci-quickstart/config/testenv/ovb-rdocloud.yml | 16 +++++++++++++++- toci-quickstart/config/testenv/ovb-vexxhost.yml | 16 +++++++++++++++- 4 files changed, 60 insertions(+), 4 deletions(-) diff --git a/toci-quickstart/config/testenv/multinode-rdocloud.yml b/toci-quickstart/config/testenv/multinode-rdocloud.yml index 300d451d7..d78f52f3e 100644 --- a/toci-quickstart/config/testenv/multinode-rdocloud.yml +++ b/toci-quickstart/config/testenv/multinode-rdocloud.yml @@ -40,7 +40,21 @@ build_undercloud: false tempest_track_resources: false # Rely on RDO registry instead of docker.io due to rate limit -docker_registry_host: trunk.registry.rdoproject.org +# 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 + {%- elif job.registry_ip_address is defined -%} + {{ job.registry_ip_address }}:5001 + {%- else -%} + trunk.registry.rdoproject.org + {%- endif -%} # Use cirros cached image tempest_test_image_path: /opt/cache/files/cirros-0.4.0-x86_64-disk.img diff --git a/toci-quickstart/config/testenv/multinode-vexxhost.yml b/toci-quickstart/config/testenv/multinode-vexxhost.yml index ad6952569..2dbd662cd 100644 --- a/toci-quickstart/config/testenv/multinode-vexxhost.yml +++ b/toci-quickstart/config/testenv/multinode-vexxhost.yml @@ -36,7 +36,21 @@ build_image_isolated: false build_undercloud: false # Rely on RDO registry instead of docker.io due to rate limit -docker_registry_host: trunk.registry.rdoproject.org +# 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 + {%- elif job.registry_ip_address is defined -%} + {{ job.registry_ip_address }}:5001 + {%- else -%} + trunk.registry.rdoproject.org + {%- endif -%} # We don't need to cleanup TripleO CI tempest_track_resources: false diff --git a/toci-quickstart/config/testenv/ovb-rdocloud.yml b/toci-quickstart/config/testenv/ovb-rdocloud.yml index 9e1ee4529..3d9b159bc 100644 --- a/toci-quickstart/config/testenv/ovb-rdocloud.yml +++ b/toci-quickstart/config/testenv/ovb-rdocloud.yml @@ -26,7 +26,21 @@ update_containers: >- {%- endif -%} # Rely on RDO registry instead of docker.io due to rate limit -docker_registry_host: trunk.registry.rdoproject.org +# 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 + {%- elif job.registry_ip_address is defined -%} + {{ job.registry_ip_address }}:5001 + {%- else -%} + trunk.registry.rdoproject.org + {%- endif -%} # We don't need to cleanup TripleO CI tempest_track_resources: false diff --git a/toci-quickstart/config/testenv/ovb-vexxhost.yml b/toci-quickstart/config/testenv/ovb-vexxhost.yml index f4e910e3e..4a6987691 100644 --- a/toci-quickstart/config/testenv/ovb-vexxhost.yml +++ b/toci-quickstart/config/testenv/ovb-vexxhost.yml @@ -26,7 +26,21 @@ update_containers: >- {%- endif -%} # Rely on RDO registry instead of docker.io due to rate limit -docker_registry_host: trunk.registry.rdoproject.org +# 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 + {%- elif job.registry_ip_address is defined -%} + {{ job.registry_ip_address }}:5001 + {%- else -%} + trunk.registry.rdoproject.org + {%- endif -%} # We don't need to cleanup TripleO CI tempest_track_resources: false