diff options
Diffstat (limited to 'tests/templates')
| -rw-r--r-- | tests/templates/repos.yaml.j2 | 63 | ||||
| -rw-r--r-- | tests/templates/template_overrides.j2 | 44 |
2 files changed, 64 insertions, 43 deletions
diff --git a/tests/templates/repos.yaml.j2 b/tests/templates/repos.yaml.j2 new file mode 100644 index 000000000..42c6724f9 --- /dev/null +++ b/tests/templates/repos.yaml.j2 @@ -0,0 +1,63 @@ +--- +{% if base_distro == 'debian' %} +debian: + debian: + component: "main" + gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg" + suite: "trixie trixie-updates trixie-backports" + trusted: True + url: "http://{{ nodepool_mirror_host }}/debian" + debian-security: + component: "main" + gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg" + suite: "trixie-security" + trusted: True + url: "http://{{ nodepool_mirror_host }}/debian-security" +{% elif base_distro == 'rocky' %} +rocky: + appstream: + baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/os/" + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + name: "appstream" + baseos: + baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/" + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + name: "baseos" + crb: + baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/CRB/$basearch/os/" + gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10" + name: "crb" +{% elif base_distro == 'ubuntu' %} +ubuntu: + ubuntu: + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble noble-updates noble-backports" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu/" + ubuntu-security: + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble-security" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu/" + ubuntu-cloud-archive: + component: "main" + gpg_key: "/usr/share/keyrings/ubuntu-cloud-keyring.gpg" + suite: "noble-updates/gazpacho" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive" +ubuntu-aarch64: + ubuntu: + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble noble-updates noble-backports" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu-ports/" + ubuntu-security: + component: "main universe" + gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg" + suite: "noble-security" + trusted: True + url: "http://{{ nodepool_mirror_host }}/ubuntu-ports/" +{% endif %} 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 %} |
