diff options
| author | Michal Nasiadka <mnasiadka@gmail.com> | 2026-06-15 17:49:31 +0200 |
|---|---|---|
| committer | Michal Nasiadka <mnasiadka@gmail.com> | 2026-07-09 08:49:17 +0200 |
| commit | 77d310a9ff344a09f35b2c0536b0f7b9e8677deb (patch) | |
| tree | 59130fd2f762eb3d62f7e33cfa32d9edcf10265f /tests/templates/template_overrides.j2 | |
| parent | 44b4d81399792f539716618953f2cafa64086a5c (diff) | |
| download | kolla-77d310a9ff344a09f35b2c0536b0f7b9e8677deb.tar.gz kolla-77d310a9ff344a09f35b2c0536b0f7b9e8677deb.zip | |
Add support to override base repos
BaseOS and AppStream for CentOS/Rocky
ubuntu, ubuntu-security for Ubuntu
debian, debian-security for Debian
ubuntu-cloud-archive is not really a base repo - so
removing it from ubuntu.sources
Change-Id: Iab98de963f2e8532389b7563bb572d8aa20c7aa6
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Diffstat (limited to 'tests/templates/template_overrides.j2')
| -rw-r--r-- | tests/templates/template_overrides.j2 | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/tests/templates/template_overrides.j2 b/tests/templates/template_overrides.j2 index 481795cd6..cf34eb37f 100644 --- a/tests/templates/template_overrides.j2 +++ b/tests/templates/template_overrides.j2 @@ -18,42 +18,9 @@ RUN echo registry={{ nodepool_npmjs_proxy }} > /etc/npmrc \ {% endblock %} {% endraw %} -{% if base_distro == 'rocky' %} -{% raw %} -{% block base_centos_repo_overrides_post_copy %} -{% endraw %} -RUN sed -i -e "s/^mirrorlist/#mirrorlist/g" -e "s/^#baseurl/baseurl/g" \ - /etc/yum.repos.d/rocky.repo -{% raw %} -{% endblock %} -{% endraw %} -{% endif %} - -{% raw %} -{% block base_debian_after_sources_list %} -{% endraw %} -{% if base_distro == "debian" %} - -RUN cp /etc/apt/sources.list.d/debian.sources /tmp/ && \ - sed -i -e "s|^URIs: http://deb.debian.org/debian$|URIs: http://{{ nodepool_mirror_host }}/debian\nTrusted: yes|" \ - -e "s|^URIs: http://deb.debian.org/debian-security|URIs: http://{{ nodepool_mirror_host }}/debian-security\nTrusted: yes|" \ - /etc/apt/sources.list.d/debian.sources - -{% elif base_distro == "ubuntu" %} - -RUN cp /etc/apt/sources.list.d/ubuntu.sources /tmp/ && \ - sed -i -e "s|^URIs: http://archive.ubuntu.com/ubuntu/$|URIs: http://{{ nodepool_mirror_host }}/ubuntu/\nTrusted: yes|" \ - -e "s|^URIs: http://security.ubuntu.com/ubuntu/$|URIs: http://{{ nodepool_mirror_host }}/ubuntu/\nTrusted: yes|" \ - -e "s|^URIs: http://ports.ubuntu.com/ubuntu-ports/$|URIs: http://{{ nodepool_mirror_host }}/ubuntu-ports/\nTrusted: yes|" \ - -e "s|^URIs: http://ubuntu-cloud.archive.canonical.com/ubuntu$|URIs: http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive\nTrusted: yes|" \ - /etc/apt/sources.list.d/ubuntu.sources - -{% endif %} -{% raw %} -{% endblock %} - {# Revert to upstream mirrors after build is complete #} +{% raw %} {% block footer %} {% endraw %} @@ -67,15 +34,6 @@ RUN if [ -f /usr/etc/npmrc ]; then \ fi \ && rm -f /etc/npmrc -{% if base_distro == "debian" %} -RUN if [ -f /tmp/debian.sources ]; then \ - mv -f /tmp/debian.sources /etc/apt/sources.list.d/debian.sources; \ - fi -{% elif base_distro == "ubuntu" %} -RUN if [ -f /tmp/ubuntu.sources ]; then \ - mv -f /tmp/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources; \ - fi -{% endif %} {% raw %} {% endblock %} {% endraw %} |
