ci: run every step in an image this repo builds (base image, no shared store) #123
No reviewers
Labels
No labels
blocked
bug
duplicate
effort
high
effort
low
effort
medium
effort
minimal
enhancement
help wanted
invalid
pr
feedback
pr
reviewing
question
status
backlog
status
document
status
done
status
implement
status
pending
status
planning
status
reviewing
waiting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tepichord/milner!123
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/109-nix-base"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #109.
Every step of both pipeline files now runs one image this repository builds,
zot.faun-snapper.ts.net/milner/nix-base:2.35.2, and nothing mounts a store.What changed
flake.nixgainsnixBaseImage: the pinned nix (2.35.2),ciEnv(abuildEnvoverciTools),install-ci-env,/bin/sh(static busybox) and/bin/bash(bashOnly),cacert, the flake's inputs transitively,devShells.ci's build-time closure, and — viabuildLayeredImageWithNixDb— the store's database.extraCommandswrites/etc/nix/nix.conf(sandbox = false, no build users),/rootwithHOME=/root, and/usr/bin/env.nixBaseCheckasserts all of it against theimage's own bytes and asks the image's own nix whether a path it carries is
valid.
devShellssplits intodefault(the fat workstation shell, unchanged)and
ci(ciTools), so a step does not pay for qemu to runpytest.helmandhtpasswdjoinciTools: the suite skips four tests withoutthem and still reports "passed".
.woodpecker/gates.yaml/cleanup.yaml: every step is the base imagewith
pull: trueand novolumes; everynix developnames.#ci. A newfirst step,
build-nix-base, builds and checks the image on a pull requestand pushes it on
main(digest-verified). A newnix-base-tag-guardholdsthe tag and the flake's nix pin together in both directions.
docs/nix.md§14 rewritten (what is in the image and why, who runsit, the traps), §15d the hand-push;
docs/storage.md§10a/§10g, OPERATIONS.md7a, ARCHITECTURE.md, AGENTS.md,
docs/woodpecker-ci.md§9m and thenix-storemanifests now say the shared store is retired rather than shared.USER_STORIES.mdrewritten: a step starts from an imagecarrying what earlier builds realised; nothing is mounted, seeded or topped up.
The bootstrap
The tag had to exist before any step could start, so it was published by hand
(the recipe is
docs/nix.md§15d):skopeo copytomilner/nix-base:2.35.2, digestsha256:8807059e…, served manifest digestcompared equal.
Measured, in the published image (
podman run, arm64)nix develop .#ci --command python3 -V— 2 s,--network=none.nix build ./#gnused— 0 s, a store hit,--network=none.Three failures were found this way and are fixed here, each documented as a
trap in
docs/nix.md§14d: a store without its database (every path invalid,900 MB re-downloaded), a flake input's own inputs (
nix-systems/default), andnix developneeding the shell's build-time closure (stdenv).Not in this PR
gitops/clusters/milner/infrastructure/nix-store/(the PVC and thenixStorageClass) is kept and documented as unmounted — deleting it is a separate
decision, since the durable disk behind it also holds what previous runs
realised.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.