vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Add packaging, a CI workflow, and containerised local runs
3b39a84c913cabe15bfa6a60dd176ff2dd28d241 · Keenan Nemetz · 15d ago · parent 30a72490
Add packaging, a CI workflow, and containerised local runs A v* tag now builds a .deb and a .rpm for amd64 and arm64 with nfpm and attaches them, with checksums, to the release. The package ships the systemd unit, a config at /etc/vole/vole.toml, and a postinstall that creates the service account and prepares the instance that config names; `vole admin init --config` is what makes that possible, and the binary's version is stamped from the tag instead of the source tree. scripts/ci.sh becomes .vole/workflows/ci.yaml, so `vole workflow run ci` executes exactly what a push runs, and the Markdown link check moves to scripts/check-links.py. Local runs now always execute in the job image and share ci/container with the runner; --no-container is gone, because a run in a different environment proves nothing about CI. The runner mounts a per-repository namespace at /cache and sets no variable for it: a job opts in through its image's env or the new job-level env, which is pinned with the queue and delivered with the lease. Whole namespaces are evicted least-recently-written first so a module cache is never half-deleted, and contributor branches get their own namespace so an untrusted tip cannot seed the cache a protected branch builds into. Running the suite in that container found four bugs worth naming: /tmp was mounted noexec, which broke `go test` and `go run`; the read-only root is gone, because images make toolchain directories world-writable deliberately and the mount set is what protects the host; OpenSSH needs a passwd entry for the job's uid; and a lost metadata push reported as "cannot lock ref" was not classified as a race, so concurrent CLI writes gave up on the first collision. That retry now backs off exponentially with jitter.
packaging/systemd/vole.service +42
| @@ -0,0 +1,42 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=Vole software forge | ||
| 3 | Documentation=https://github.com/rodent-software/vole | ||
| 4 | After=network-online.target | ||
| 5 | Wants=network-online.target | ||
| 6 | |||
| 7 | [Service] | ||
| 8 | Type=simple | ||
| 9 | User=vole | ||
| 10 | Group=vole | ||
| 11 | ExecStart=/usr/bin/vole serve --config /etc/vole/vole.toml | ||
| 12 | Restart=on-failure | ||
| 13 | RestartSec=2s | ||
| 14 | |||
| 15 | # The instance lives in /var/lib/vole. systemd creates and owns it, and with | ||
| 16 | # ProtectSystem=strict it is the only writable directory the service gets. | ||
| 17 | StateDirectory=vole | ||
| 18 | StateDirectoryMode=0750 | ||
| 19 | ConfigurationDirectory=vole | ||
| 20 | |||
| 21 | # Vole runs git for every push and read, so a busy instance has many children. | ||
| 22 | LimitNOFILE=65536 | ||
| 23 | |||
| 24 | # The SSH listener is 2222 in the packaged config. To bind a port below 1024, add | ||
| 25 | # AmbientCapabilities=CAP_NET_BIND_SERVICE; nothing else needs privilege. | ||
| 26 | NoNewPrivileges=true | ||
| 27 | PrivateTmp=true | ||
| 28 | ProtectSystem=strict | ||
| 29 | ProtectHome=true | ||
| 30 | ProtectClock=true | ||
| 31 | ProtectHostname=true | ||
| 32 | ProtectKernelTunables=true | ||
| 33 | ProtectKernelModules=true | ||
| 34 | ProtectControlGroups=true | ||
| 35 | RestrictNamespaces=true | ||
| 36 | RestrictRealtime=true | ||
| 37 | RestrictSUIDSGID=true | ||
| 38 | LockPersonality=true | ||
| 39 | SystemCallArchitectures=native | ||
| 40 | |||
| 41 | [Install] | ||
| 42 | WantedBy=multi-user.target | ||