c506e626e7
This patchset includes pushing mechanism for daily periodic jobs. Change-Id: Ic4179ffd3a6e640abfb181dbd000bc75cc64b750
57 lines
1.9 KiB
Django/Jinja
57 lines
1.9 KiB
Django/Jinja
{% raw %}
|
|
{% extends parent_template %}
|
|
|
|
{% block base_header %}
|
|
{% endraw %}
|
|
|
|
RUN echo $(base64 -w0 "{{ pip_conf }}") | base64 -d > /etc/pip.conf
|
|
|
|
{% raw %}
|
|
{% if base_distro == 'ubuntu' %}
|
|
|
|
RUN echo 'APT::Get::AllowUnauthenticated "true";' > /etc/apt/apt.conf.d/99allow-unauthenticated
|
|
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block base_footer %}
|
|
{% if base_distro == "centos" %}
|
|
{% endraw %}
|
|
|
|
RUN sed -i -e "/^mirrorlist/d" \
|
|
-e "s|^#baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
/etc/yum.repos.d/CentOS-Base.repo \
|
|
&& sed -i -e "/^mirrorlist/d" \
|
|
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
/etc/yum.repos.d/epel.repo \
|
|
&& sed -i -e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
/etc/yum.repos.d/CentOS-Ceph-Jewel.repo \
|
|
&& sed -i -e "s|^baseurl=https://trunk.rdoproject.org|baseurl=http://{{ nodepool_rdo_proxy }}|" \
|
|
/etc/yum.repos.d/delorean.repo
|
|
|
|
{% raw %}
|
|
{% elif base_distro == "oraclelinux" %}
|
|
{% endraw %}
|
|
|
|
RUN sed -i -e "/^mirrorlist/d" \
|
|
-e "s|^#baseurl=http://download.fedoraproject.org/pub|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
/etc/yum.repos.d/epel.repo \
|
|
&& sed -i -e "s|^baseurl=http://mirror.centos.org|baseurl=http://{{ nodepool_mirror_host }}|" \
|
|
/etc/yum.repos.d/CentOS-Ceph-Jewel.repo \
|
|
&& sed -i -e "s|^baseurl=https://trunk.rdoproject.org|baseurl=http://{{ nodepool_rdo_proxy }}|" \
|
|
/etc/yum.repos.d/delorean.repo
|
|
|
|
{% raw %}
|
|
{% elif base_distro == "ubuntu" %}
|
|
{% endraw %}
|
|
|
|
RUN sed -i -e "s|http://archive.ubuntu.com|http://{{ nodepool_mirror_host }}|" \
|
|
-e "s|http://ubuntu-cloud.archive.canonical.com/ubuntu|http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive|" \
|
|
/etc/apt/sources.list \
|
|
&& apt-get update
|
|
|
|
{% raw %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% endraw %}
|