Build & Deploy Patterns
Parallel Antora builds across domus spokes — validate each spoke independently
ls -d ~/atelier/_bibliotheca/domus-*/ | xargs -P4 -I{} sh -c 'echo "=== Building {} ==="; make -C {} 2>&1 | tail -5'
Parallel npm install across monorepo packages
find ~/project -maxdepth 2 -name 'package.json' -not -path '*/node_modules/*' -printf '%h\n' | xargs -P4 -I{} sh -c 'echo "--- {} ---"; npm --prefix {} install'
Build all Makefiles found in subdirectories
find ~/atelier/_bibliotheca -maxdepth 2 -name 'Makefile' -printf '%h\n' | xargs -P4 -I{} sh -c 'echo "=== {} ==="; make -C {} 2>&1 | grep -E "WARN|ERROR" || echo "clean"'
Parallel shellcheck across all shell scripts
find ~/atelier/_projects -name '*.sh' -print0 | xargs -0 -P4 shellcheck --format=gcc
Parallel pylint across Python files
find ~/atelier/_projects -name '*.py' -not -path '*/.venv/*' -print0 | xargs -0 -P4 -n1 pylint --disable=C0114
Deploy artifacts to multiple hosts — parallel scp
cat <<'EOF' | xargs -P4 -I{} scp /tmp/artifact.tar.gz {}:/opt/deploy/
192.168.1.10
192.168.1.11
192.168.1.12
EOF
Parallel docker build for multiple Dockerfiles
find ~/atelier/_projects -name 'Dockerfile' -printf '%h\n' | xargs -P4 -I{} sh -c 'tag=$(basename {}); docker build -t "$tag:latest" {}'
Multi-repo push — parallel push all domus spokes to origin
ls -d ~/atelier/_bibliotheca/domus-*/ | xargs -P4 -I{} sh -c 'echo "pushing {}..."; git -C {} push origin main 2>&1 | tail -1'