aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2026-06-17 07:24:16 +0200
committerMichal Nasiadka <mnasiadka@gmail.com>2026-08-05 10:13:09 +0200
commit5aabec47f057d9cb32aab520d666e51bd9ee37c6 (patch)
tree181eecd8804b7dd6b47ffa768ab94565f751728b /tests
parent8e912a9db7f013a1abfc1e70a829e435d50622db (diff)
downloadkolla-5aabec47f057d9cb32aab520d666e51bd9ee37c6.tar.gz
kolla-5aabec47f057d9cb32aab520d666e51bd9ee37c6.zip
Add cleanup_repos to revert build_only overrides
Repos marked build_only: true are backed up before handle_repos() overwrites them and restored at the end of each image build, so CI mirror URLs are not baked into the final image. The cleanup RUN was injected into every Dockerfile, not just images that called handle_repos() for those repos. Child images with no backup fell through to "rm -f", deleting the inherited repo file (e.g. debian.sources in bifrost-base, breaking cpio install). Fix by adding a {repo}.enabled sentinel that handle_repos creates when it processes a build_only repo, making the cleanup conditional on that sentinel. Change-Id: Ie5b9970a4575b6258dc238059d3f33ddfe155789 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/templates/repos.yaml.j210
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/templates/repos.yaml.j2 b/tests/templates/repos.yaml.j2
index 42c6724f9..9129f74eb 100644
--- a/tests/templates/repos.yaml.j2
+++ b/tests/templates/repos.yaml.j2
@@ -2,12 +2,14 @@
{% if base_distro == 'debian' %}
debian:
debian:
+ build_only: true
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:
+ build_only: true
component: "main"
gpg_key: "/usr/share/keyrings/debian-archive-keyring.gpg"
suite: "trixie-security"
@@ -17,31 +19,37 @@ debian:
rocky:
appstream:
baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/os/"
+ build_only: true
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10"
name: "appstream"
baseos:
baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/os/"
+ build_only: true
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10"
name: "baseos"
crb:
baseurl: "http://dl.rockylinux.org/$contentdir/$releasever/CRB/$basearch/os/"
+ build_only: true
gpgkey: "file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-10"
name: "crb"
{% elif base_distro == 'ubuntu' %}
ubuntu:
ubuntu:
+ build_only: true
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:
+ build_only: true
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:
+ build_only: true
component: "main"
gpg_key: "/usr/share/keyrings/ubuntu-cloud-keyring.gpg"
suite: "noble-updates/gazpacho"
@@ -49,12 +57,14 @@ ubuntu:
url: "http://{{ nodepool_mirror_host }}/ubuntu-cloud-archive"
ubuntu-aarch64:
ubuntu:
+ build_only: true
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:
+ build_only: true
component: "main universe"
gpg_key: "/usr/share/keyrings/ubuntu-archive-keyring.gpg"
suite: "noble-security"