CI/CD ephemeral builder
CI should prefer disposable runtime guests and explicit build artifacts.
Basic CI shape
Section titled “Basic CI shape”export MVM_DATA_DIR="$PWD/.mvm-ci"
mvmctl doctor --jsonmvmctl build ./ci-worker --jsonmvmctl run --timeout 600 --receipt /tmp/mvm-run-receipt.json -- ./scripts/test.shKeep generated receipts as build artifacts when they are useful for audit or debugging. Do not persist the full runtime state unless the job explicitly needs a cache.
Cache policy
Section titled “Cache policy”It is reasonable to cache:
- Nix store/substituter state in the builder environment;
- downloaded release artifacts after verification;
- manifest build slots for trusted branches.
Avoid caching:
- guest runtime directories from untrusted jobs;
- snapshots that may contain secrets or source code;
- broad host directories mounted read-write into the guest.
Cleanup
Section titled “Cleanup”mvmctl downmvmctl manifest prune --orphans --dry-runmvmctl cache prune --orphan-buildsUse dry-run first on shared runners.