From ad03d7eaa25c31b201ec1c7dc2596f67bbe4fdaf Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 10 Jan 2020 16:45:13 +0100 Subject: 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 --- tests/templates/template_overrides.j2 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/templates/template_overrides.j2 b/tests/templates/template_overrides.j2 index b77031876..515ae63ce 100644 --- a/tests/templates/template_overrides.j2 +++ b/tests/templates/template_overrides.j2 @@ -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 %} -- cgit v1.2.3