Compare commits

...

2 Commits

Author SHA1 Message Date
Dustin 346c88a179 ci: Add CAP_CHROOT to build container
dustin/photoframe2/pipeline/head This commit looks good Details
This is needed in order to run `passwd -R` to clear the root password
in the target filesystem.
2024-12-30 17:18:24 -06:00
Dustin 5726d2b76f ci: Use persistent volumes for portage, binpkgs
Recompiling the entire OS for every build takes way too long for
development purposes.  Since we build binary packages anyway, let's keep
them around between builds by storing them on a Kubernetes persistent
volume.

Eventually, I want add a build parameter to wipe out the binary package
storage to force a from-scratch build.  We'll use that option for robust
periodic builds, once development has slowed down.
2024-12-30 13:33:02 -06:00
2 changed files with 22 additions and 4 deletions

View File

@ -13,6 +13,7 @@ spec:
capabilities:
add:
- CAP_SETFCAP
- CAP_SYS_CHROOT
volumeMounts:
- mountPath: /build
name: workspace-volume
@ -21,12 +22,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

8
prepare.sh Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
if [ ! -f /var/db/repos/gentoo/metadata/timestamp ]; then
emerge-webrsync
fi
if [ "$(find /var/db/repos/gentoo/metadata -newermt '-24 hours' | wc -l)" -eq 0 ]; then
emaint sync
fi