CI: use Debian/Ubuntu mirrors in base image
So far we built 'base' image using upstream mirrors and then replaced them with OpenStack infra ones. Let do that right after we copy own APT sources.list file. Change-Id: Icb745f628c1c50d9f20df022b08ddc46fccc270c
This commit is contained in:
parent
2cf3f2309a
commit
ad03d7eaa2
|
@ -308,6 +308,8 @@ COPY sources.list.{{ base_distro }}.{{ base_arch }} /etc/apt/sources.list
|
|||
COPY sources.list /etc/apt/sources.list.d/kolla-custom.list
|
||||
{% endblock %}
|
||||
|
||||
{% block base_debian_after_sources_list %}{% endblock %}
|
||||
|
||||
{% block base_ubuntu_package_apt_preferences %}
|
||||
COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
|
||||
COPY apt_preferences /etc/apt/preferences.d/kolla-custom
|
||||
|
|
|
@ -63,15 +63,13 @@ RUN sed -i \
|
|||
{% raw %}
|
||||
{% endblock %}
|
||||
|
||||
{% block base_footer %}
|
||||
## TODO(yoctozepto): replace base repo earlier as well (like RHEL-based do)
|
||||
{% block base_debian_after_sources_list %}
|
||||
{% if base_distro == "debian" %}
|
||||
{% endraw %}
|
||||
|
||||
RUN sed -i -e "s|http://deb.debian.org|http://{{ nodepool_mirror_host }}|" \
|
||||
-e "s|http://security.debian.org|http://{{ nodepool_mirror_host }}|" \
|
||||
/etc/apt/sources.list \
|
||||
&& apt-get update
|
||||
/etc/apt/sources.list
|
||||
|
||||
{% raw %}
|
||||
{% elif base_distro == "ubuntu" %}
|
||||
|
@ -79,8 +77,7 @@ RUN sed -i -e "s|http://deb.debian.org|http://{{ nodepool_mirror_host }}|" \
|
|||
|
||||
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
|
||||
/etc/apt/sources.list
|
||||
|
||||
{% raw %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue