monasca-thresh/docker/settings.xml.j2
Michał Piotrowski 5cb9f94387 Create Docker image and build in Zuul for Monasca-Thresh
Story: 2001694
Task: 30289

Change-Id: If3323a18ac3697a92ca3f06b0db154517582d7aa
2019-08-29 10:09:14 +02:00

29 lines
630 B
Django/Jinja
Executable File

<settings>
<localRepository>/repo</localRepository>
<proxies>
{% if HTTP_PROXY %}
{% set proxy = HTTP_PROXY %}
{% elif http_proxy %}
{% set proxy = http_proxy %}
{% endif %}
{% if proxy %}
{% set hostport = proxy.rpartition('//')[-1].partition('/')[0] %}
{% if ':' in hostport %}
{% set host, port = hostport.split(':', 1) %}
{% else %}
{% set host = hostport %}
{% set port = '80' %}
{% endif %}
<proxy>
<id>proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>{{ host }}</host>
<port>{{ port }}</port>
</proxy>
{% endif %}
</proxies>
</settings>