Releases for cnx01: every push to main becomes a signed release
CI / secret scan (push) Successful in 5s
CI / fmt, clippy, tests (push) Successful in 35s
CI / release (push) Skipped

As thukthuk and lampbench-web: once the checks pass on a push to main, the
CI job `release` reserves the next CalVer version (YYYY.M.MICRO, Bangkok
time) with a draft release, builds the server on Ubuntu 22.04 (glibc 2.35)
with that version and the commit (`VISA_COMMIT`), packs bin/visa, VERSION
and COMMIT as visa-linux-x86_64.tar.gz, signs it with the repository secret
RELEASE_SIGNING_KEY (ssh-keygen, namespace visa-release, principal visa-ci;
checked against release/allowed-signers before it is published) and
publishes the release. cnx01 will install a release only with that
signature (cnx-network-clan modules/visa, in a PR of its own).

- .gitea/scripts/release.py and test_release.py from lamp-testbench (the
  same reserve/publish/discard and version order), with visa's one archive;
  sign-release.sh; build-release.sh. The release scripts' tests run in the
  check job.
- `visa --version` (and `visa version`): "visa <version> (<commit>)", which
  CI and cnx01's fetch check.
- The key was made locally, put into the secret through the API and
  deleted; only its public half is in the repo.
- README, AGENTS (main is live: push only whole steps), PLAN's decisions.

Checks: fmt, clippy; test_release.py 14 tests OK in WSL; `visa --version`.
This commit is contained in:
grabowski committed 2026-11-20 17:06:14 +07:00
1 parent 1f54d93643
commit 0d3b2d8b84
10 files changed
+866 -9

No files matched your search

+15 -6
View File
@@ -156,13 +156,22 @@ servers. The fleet's module is `modules/visa` in cnx-network-clan, with its
runbook in `docs/src/visa.md` there. Only members of the Kanidm group `visa`
get in; members are set in the fleet's `identity/people.nix`.
A release is a push to `main` here, then `nix flake update visa` in
cnx-network-clan and a deploy of cnx01. The fleet's VM test `checks.visa`
signs in through a fake provider, adds a person and checks the audit log on
the real PostgreSQL module.
A push to `main` is a release, as for thukthuk and lampbench-web: once the
checks pass, CI builds the server on Ubuntu 22.04, signs it with a key only
CI holds (the repository secret `RELEASE_SIGNING_KEY`; its public half is
`release/allowed-signers`) and publishes it as the next release, named by
date (2026.11.0, 2026.11.1, ...). cnx01 looks every 15 minutes, installs a
release only with that signature, and restarts the app on it; migrations
run at that start. So `main` must stay deployable. On cnx01,
`visa-releases status` shows what runs, and `visa-releases rollback` goes
back one release and holds it until `visa-releases unpin`; a rollback does
not undo a migration. The fleet's VM test `checks.visa` signs in through a
fake provider, adds a person and checks the audit log on the real
PostgreSQL module.
Which commit runs: every page's footer names it, with a link to it, and
https://visa.buildfor.life/version answers with the full hash, without a
login, so `curl https://visa.buildfor.life/version` tells whether a release
is live. A Nix build takes the commit from the flake's source; a build in a
checkout asks git.
is live, and `visa --version` prints the release and the commit. A Nix
build takes the commit from the flake's source, CI from `VISA_COMMIT`, a
build in a checkout from git.