Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0.0-proposed] Change order of if-elif conditionals in set_openstack_containers template #2201

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions roles/set_openstack_containers/templates/update_env_vars.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,9 @@ export PATH="{{ cifmw_path }}"
{% set container_data = container.split('=') -%}
{% set _container_env = container_data[0] -%}
{% set _container = container_data[1] -%}
{# This section overrides the non openstack services containers #}
{% if cifmw_set_openstack_containers_overrides.keys()|length > 0 -%}
{% if _container_env in cifmw_set_openstack_containers_overrides.keys() -%}
{% set _ = containers_dict.update({_container_env: cifmw_set_openstack_containers_overrides[_container_env]}) -%}
{% endif -%}
{# All the openstack services containers contain /openstack- prefix #}
{# It filters out the same and update the container address with new url #}
{% elif (_container_prefix in _container) and ('operator' not in _container) -%}
{% if (_container_prefix in _container) and ('operator' not in _container) -%}
{% set _container_data = _container.split(_container_prefix)[-1] -%}
{# There is sha256 tag initially for container tags, but in some jobs we switch to dlrn tag #}
{% if '@sha256' in _container_data -%}
Expand All @@ -36,6 +31,11 @@ export PATH="{{ cifmw_path }}"
{% endif -%}
{% set _container_address = _container_registry + '/' + _container_prefix + _container_name + ':' + cifmw_set_openstack_containers_tag -%}
{% set _ = containers_dict.update({_container_env: _container_address}) -%}
{# This section overrides the non openstack services containers #}
{% elif cifmw_set_openstack_containers_overrides.keys() | length > 0 -%}
{% if _container_env in cifmw_set_openstack_containers_overrides.keys() -%}
{% set _ = containers_dict.update({_container_env: cifmw_set_openstack_containers_overrides[_container_env]}) -%}
{% endif -%}
{% endif -%}
{% endfor -%}

Expand Down
Loading