From 9c9a301f7f2ea55e0095353b78db3e668cd6209c Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 22 Dec 2024 20:29:33 -0600 Subject: [PATCH] wip: use persistent volumes for portage, binpkgs --- ci/podTemplate.yaml | 17 +++++++++++++---- prepare.sh | 5 +++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ci/podTemplate.yaml b/ci/podTemplate.yaml index 7ea65cf..f4bc25b 100644 --- a/ci/podTemplate.yaml +++ b/ci/podTemplate.yaml @@ -21,12 +21,21 @@ spec: name: workspace-volume subPath: gentoo - mountPath: /usr/aarch64-unknown-linux-gnu/var/cache/binpkgs - name: workspace-volume - subPath: binpkgs + name: binpkgs + subPath: photoframe2 - mountPath: /var/cache/binpkgs - name: workspace-volume - subPath: binpkgs + name: binpkgs + subPath: photoframe2 - mountPath: /var/cache/distfiles name: workspace-volume subPath: distfiles + - mountPath: /var/db/repos/gentoo + name: portage hostUsers: false + volumes: + - name: binpkgs + persistentVolumeClaim: + claimName: binpkgs + - name: portage + persistentVolumeClaim: + claimName: portage diff --git a/prepare.sh b/prepare.sh index a450bb3..7458ab1 100644 --- a/prepare.sh +++ b/prepare.sh @@ -1,5 +1,10 @@ #!/bin/sh +if [ ! -f /var/db/repos/gentoo/metadata/timestamp ]; then + emerge-webrsync +else + emaint sync +fi mkdir -p /etc/portage/package.use mkdir -p /etc/portage/make.conf