Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hivectl/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas e2da5509ae swarm-ci-runner: run the forge CI runner as a swarm service
The CI runner was a hive deploy module: hive-ci.nix ran it beside the
forge, and hive-c0re registered it through the forge's admin API with
the `core` token, writing the registration token through hive-priv. It
could only run on the forge's host, and it kept an admin-scoped forge
token on a hive.

Now the runner is a swarm service:

- swarm-ci-runner.nix runs it in a `swarm-ci-runner` container on the
  host that sets deploy.ci-runner.enable, reaching the forge by name.
  It needs neither the forge nor a hive there.
- swarm-controller reads the forge's runner registration token with its
  own admin token and writes it to swarm/services/ci-runner/
  registration-token whenever it differs from what it last wrote. Its
  grant on that path is create/update only.
- The runner's own leaf (CN swarm-ci-runner, role and policy of the same
  name) reads that one path. swarm-bao-ci-runner.service fetches it into
  the runner's EnvironmentFile and restarts the runner on a change.
- A pre-start step removes .runner when the daemon's journal since its
  last start holds Forgejo's "unregistered runner" refusal (the daemon
  exits 1 when its startup Declare gets it), or when .runner names
  another forge address; upstream's pre-start step then registers again.

Removed from the hive side: hive-ci.nix and deploy.forgejo.ci.*,
forge/ci_runner.rs, PrivRequest::RegisterCiRunner and its handler and
ReadWritePaths entry, InfraContainer::Ci with hivectl's --ci and the
dashboard's hive-ci journal entry, HYPERHIVE_FORGE_CI_ENABLED, and
read:admin,write:admin from CORE_TOKEN_SCOPES: nothing else in hive-c0re
calls /api/v1/admin/*. The old ci options, under both swarm.forge.ci and
deploy.forgejo.ci, now fail evaluation naming deploy.ci-runner.

The forge's half of the old ci.enable, the actions/checkout mirror and
DEFAULT_ACTIONS_URL = self, is deploy.forgejo.actionsFromSelf.

Closes #4954
2026-10-05 13:55:37 +02:00
..
agents.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
choom.rs hive-c0re: grant hive-admin group a polkit rule for choom 2026-09-07 23:27:15 +02:00
cli.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
client.rs host.sock: give HostResponse a wire-schema version, warn on mismatch 2026-09-07 14:08:30 +02:00
completions.rs split hivectl main.rs into per-domain modules (#2509) 2026-07-16 11:28:43 +02:00
dag_progress.rs feat(#3245): gate rustdoc in nix flake check, and clear the workspace 2026-08-14 02:30:55 +02:00
forge.rs hivectl: drop forge create-user; SSO makes a human's forge account 2026-09-25 08:29:56 +02:00
gateway.rs split hivectl main.rs into per-domain modules (#2509) 2026-07-16 11:28:43 +02:00
main.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
matrix.rs matrix: swarm-controller is the only minter 2026-09-30 00:46:46 +02:00
open.rs matrix: serve the web client unconditionally; link it from the swarm domain 2026-10-02 20:02:02 +02:00
power.rs hivectl: batch QueueNodes polling by id set, drop remaining dag wording 2026-08-03 20:35:24 +02:00
quota.rs hivectl: rename hivectl agents to hivectl agent <name> <verb> 2026-07-27 19:07:18 +02:00
subvol.rs swarm-ci-runner: run the forge CI runner as a swarm service 2026-10-05 13:55:37 +02:00
util.rs hive-c0re: remove the approvals subsystem 2026-10-04 23:55:32 +02:00
watch.rs swarm: show subagent terminals in the swarm UI 2026-10-03 01:34:01 +02:00
wg.rs hive-tls: stage bao pki root in every hive's trust bundle 2026-10-04 14:37:50 +02:00