Files
computer-playbook/.github/workflows/test-deploy-single-node.yml
T
kevinveenbirkenbachandClaude Opus 5 7e2090e8b7 feat(ci): choose the docker data root's filesystem per matrix entry
The backup snapshot mode only engages on btrfs or zfs, so on CI - where the
data root is whatever the runner or the node image happens to provide - it
was never exercised at all. Nothing proved the snapshot path beyond unit
tests and a synthetic probe.

`entry-manual` gains a `filesystem` choice that reaches both deploy modes.
Empty means each matrix entry draws its own, so coverage spreads over runs
instead of pinning one path forever; the pick and its origin go to the step
summary, because reproducing a red run means re-stating it verbatim. The
draw is restricted to what every distribution of that entry can deliver -
centos stream has no btrfs at all, and zfs is a third-party repository
outside debian and ubuntu - so a run never dies on a packaging gap. A
stated filesystem skips that restriction: it is an instruction, and a host
that cannot deliver it fails loudly rather than deploying on something
else.

docker_dataroot.sh formats a sparse loop image, mounts it at /mnt/docker-fs
and carves the data root inside it, then points the daemon there through
daemon.json - merged, not overwritten, so the registry-cache entry
survives. It runs on the runner for compose and inside each node for swarm,
before anything is pulled, and installs the filesystem tooling it needs.

Two container facts it has to work around: a privileged container's /dev is
a fresh tmpfs, so neither /dev/loopN nor /dev/zfs exists there and both are
mknod'ed from /proc/devices before use.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 02:13:22 +02:00

70 lines
2.1 KiB
YAML

name: "🏝️ Test: Deploy (single-node)"
on:
workflow_call:
inputs:
distros:
description: "Space-separated distro list"
required: true
type: string
whitelist:
description: "Optional space-separated whitelist of app ids"
required: false
type: string
default: ""
lifecycles:
description: "Lifecycle envelope for discovery (comma/space-separated)."
required: false
type: string
default: ""
modes:
description: "Single-node deploy modes to run (space-separated subset of 'compose host')."
required: false
type: string
default: "compose host"
blacklist:
description: "Optional space-separated app ids to drop from discovery"
required: false
type: string
default: ""
marker:
description: "Optional suffix appended to the discover job names (e.g. ' ⭐' for the priority line)"
required: false
type: string
default: ""
filesystem:
description: "Filesystem the docker data root runs on (ext4, btrfs, zfs). Empty picks one at random."
required: false
type: string
default: ""
permissions:
contents: read
packages: read
jobs:
compose:
name: 📦 Compose
if: ${{ contains(inputs.modes, 'compose') }}
uses: ./.github/workflows/test-deploy-compose.yml
with:
distros: ${{ inputs.distros }}
whitelist: ${{ inputs.whitelist }}
lifecycles: ${{ inputs.lifecycles }}
blacklist: ${{ inputs.blacklist }}
marker: ${{ inputs.marker }}
filesystem: ${{ inputs.filesystem }}
host:
name: 💻 Host
if: ${{ contains(inputs.modes, 'host') }}
uses: ./.github/workflows/test-deploy-host.yml
with:
distros: ${{ inputs.distros }}
whitelist: ${{ inputs.whitelist }}
lifecycles: ${{ inputs.lifecycles }}
blacklist: ${{ inputs.blacklist }}
marker: ${{ inputs.marker }}
filesystem: ${{ inputs.filesystem }}
exclude_compose_covered: ${{ contains(inputs.modes, 'compose') && 'true' || 'false' }}