Files
zeekayandHanzo Dev f5eedb85c1 ci: build this image on the forge, and make the acceptance test a real gate
Two files, and neither is new policy — this is the fleet's one pipeline,
imported the way ~20 other repos import it. hanzo.yml says what to gate and
what to publish; .hanzo/workflows/cicd.yml is the ~10-line caller.

The one thing worth reading twice is the go-test gate. It installs gopls before
running the suite, at the version READ OUT OF THE DOCKERFILE, because
internal/lsp/gopls_test.go skips itself when gopls is not on PATH — and that
test is the acceptance test: it stands up a directory laid out as a Go module
proxy, points the fetch phase at it with GOPROXY=file:// so the real
`go mod download` runs with no network, and requires `locate definition` on a
dependency symbol to come back external at the module coordinate. Without the
install this repo would have shipped a green CI that never once ran the thing it
exists to do.

Reading the version from the Dockerfile rather than repeating it keeps ONE pin.
Two copies are right twice and then wrong once, and the wrong once is CI
certifying a language server the image does not run.

No `deploy:` block. Which build runs is a reviewed hanzoai/universe change —
tag plus digest — synced by cd.hanzo.ai. This daemon runs third-party language
servers over tenant source behind a jail; "which binary is behind that jail" is
the last thing that should move as a CI side effect.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-06 04:56:16 -07:00

43 lines
1.7 KiB
YAML

name: CI/CD
# The caller, and deliberately nothing else: triggers plus the import. All real
# config is the repo-root hanzo.yml, which platform.hanzo.ai reads too.
#
# `.hanzo/workflows`, NOT `.github/workflows`, and the difference is whether
# anything runs at all:
#
# * github.com has ZERO self-hosted runners for this org, so a job asking for
# `hanzo-build-linux-amd64` there is never claimed. An unclaimable job does
# not fail — it waits out the 24h timeout while the next push queues behind
# it. Silence, not an error.
# * The `git-runner` StatefulSet registers against the FORGE only
# (GIT_INSTANCE_URL=http://hanzo-git.hanzo.svc), and that is the pool which
# actually advertises that label.
#
# The `uses:` path names .hanzo/workflows for the same reason: reusables resolve
# through ResolveUses, which enforces the WORKFLOW_DIRS allowlist on the
# referenced path too. hanzoai/ci publishes build.yml at both paths from the
# same tag, so this is the same pipeline at the same @v1.
on:
push:
branches: [main]
# A `v*` tag is a RELEASE and publishes an image named after it, verbatim.
# Without this, `git tag` publishes nothing and this image carries no
# version — only the derived patch a branch build mints.
tags: ['v*']
workflow_dispatch:
# No `pull_request:`. github.com/hanzoai/lsp is UPSTREAM and git.hanzo.ai holds
# a pull mirror, which is read-only — no PR ever opens on the plane that can run
# this. A trigger nothing can fire reads as coverage this repo does not have.
concurrency:
group: cicd-${{ github.ref }}
cancel-in-progress: true
jobs:
cicd:
uses: hanzoai/ci/.hanzo/workflows/build.yml@v1
secrets: inherit