fix(ci): resolve the forge domain to loopback in the hive-ci runner
Forgejo's Actions artifact API hands the runner an upload URL built from forgejo's ROOT_URL — the public forge domain (forge.<domain>), not the runner's 127.0.0.1:<httpPort> registration URL. The hive-ci container shares host netns but has no resolver entry for the hive's own domains (the gateway's localHostsEntry only touches the host), so actions/upload-artifact fails with 'getaddrinfo ENOTFOUND forge.<domain>' while normal CI (checkout via the localhost registration URL) is unaffected. Add a networking.extraHosts entry mapping the forge domain to loopback so the upload reaches the local forge via the gateway.
This commit is contained in:
parent
f633abbdc4
commit
9902d9d9a5
1 changed files with 18 additions and 0 deletions
|
|
@ -336,6 +336,24 @@ in
|
|||
{
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
# Resolve the hive's own forge domain to loopback inside the
|
||||
# runner. The Forgejo Actions artifact API hands the runner an
|
||||
# upload URL built from forgejo's ROOT_URL — the *public* forge
|
||||
# domain (`forge.<domain>`), not the runner's
|
||||
# `127.0.0.1:<httpPort>` registration URL. This container shares
|
||||
# host netns but carries no resolver entry for the hive's own
|
||||
# domains (the gateway's `localHostsEntry` only touches the host),
|
||||
# so `actions/upload-artifact` dies with
|
||||
# Error: getaddrinfo ENOTFOUND forge.<domain>
|
||||
# while normal CI is unaffected (checkout uses the localhost
|
||||
# registration URL). Map the forge domain to loopback so the
|
||||
# upload reaches the local forge — via the gateway on :80 when
|
||||
# behindGateway, or forge directly on :httpPort otherwise. The
|
||||
# gateway proxies all of `/` (artifact endpoints included), and a
|
||||
# `localhost` domain (no hive-domain set) is already loopback, so
|
||||
# this is a harmless no-op in that case.
|
||||
networking.extraHosts = "127.0.0.1 ${forgeCfg.domain}";
|
||||
|
||||
# nspawn containers can't create user-namespaces, so nix
|
||||
# sandboxing always fails. Fall back to unsandboxed builds.
|
||||
# See docs/gotchas.md.
|
||||
|
|
|
|||
Loading…
Reference in a new issue