Merge "Set container namespace to local registry in consumer job"

This commit is contained in:
Zuul 2020-09-26 17:34:29 +00:00 committed by Gerrit Code Review
commit cb6ab4eeed
4 changed files with 15 additions and 1 deletions

View File

@ -14,3 +14,5 @@ container_prep_additional_repos: ""
update_containers_repo: >-
{% if compressed_gating_repo is defined %}{{ gating_repo_name }},{% endif %}delorean-current
{%- if container_prep_additional_repos -%},{{ container_prep_additional_repos }}{%- endif -%}
local_registry_ip: 127.0.0.1
local_registry_port: 5001

View File

@ -42,7 +42,12 @@ openstack overcloud container image prepare \
--output-images-file {{ working_dir }}/overcloud_containers.yaml \
--output-env-file {{ working_dir }}/containers-default-parameters.yaml \
${PREPARE_ARGS} \
--namespace {{ docker_registry_host }}/{{ docker_registry_namespace_used }} \
{% if job.consumer_job | default(false) | bool and job.registry_ip_address is defined %}
--namespace "{{ job.registry_ip_address }}:{{ local_registry_port }}/{{ docker_registry_namespace_used }}" \
{% else %}
--namespace "{{ docker_registry_host }}/{{ docker_registry_namespace_used }}" \
{% endif %}
--tag {{ container_build_id }} \
{% if docker_prep_prefix is defined %}
--prefix "{{ docker_prep_prefix }}" \

View File

@ -113,3 +113,6 @@ undercloud_upgrade_composable_scenario: ""
undercloud_prep_post_hook_script: ""
undercloud_tht_rpm_url: ""
download_undercloud_templates_rpm: false
local_registry_ip: 127.0.0.1
local_registry_port: 5001

View File

@ -35,7 +35,11 @@ parameter_defaults:
{% endif %}
set:
tag: "{{ container_build_id }}"
{% if job.consumer_job | default(false) | bool and job.registry_ip_address is defined %}
namespace: "{{ job.registry_ip_address }}:{{ local_registry_port }}/{{ docker_registry_namespace_used }}"
{% else %}
namespace: "{{ docker_registry_host }}/{{ docker_registry_namespace_used }}"
{% endif %}
name_prefix: "{{ docker_prep_prefix }}"
name_suffix: "{{ docker_prep_suffix }}"
rhel_containers: "{{ rhel_containers }}"