ci(release): roll every release onto the uom site #52

Merged
whitlocktech merged 1 commits from feat/deploy-uom into main 2026-11-27 14:58:32 -06:00
Member

What & why

The website rolls the uom site onto every new core image (the deploy job in build-images.yml, on
uom-deploy-runner). This does the same for the uo module: after a release is published, a
deploy-uom job rolls the uom site onto it.

It does not unpack anything itself. Core already resolves MODULES=uo@<version>=<manifest URL> at
every start (fetch, verify the sha256, unpack). The job only moves that line and restarts:

  1. Compat gate. Inside the running app container, it checks the release manifest's coreApi
    against core's MODULE_API_VERSION, using core's own semver.js. If they don't match it warns
    and changes nothing. (decided: skip + warn)
  2. .env edited in place. It rewrites the uo@… entry of the MODULES line and keeps any
    other entries. If there is no line it appends one: uo is admin-installed on that site today, so
    the first deploy appends. The file keeps its owner and mode. It refuses to run if MODULES
    appears twice, or if it comes from compose environment: (which would win over .env). A write
    that doesn't land intact puts the original back. The log only ever shows id@version.
    (decided: edit .env in place)
  3. Recreates only the app container and waits for registered module "uo" v<version>. If
    LOG_LEVEL is warn or error it checks the version on the volume instead.
  4. Rollback (added by me, not asked for). If the new version doesn't come up, it declares the
    version that was running, recreates again, and fails the job. Easy to drop if you'd rather it
    just fail.

Redeploy button: Run workflow with redeploy = true publishes nothing and deploys the newest
tag. Use it after a skipped deploy. (decided: every release + manual)

The site directory defaults to /home/perry/website; the Actions variable UOM_SITE_DIR overrides
it. Nothing on the runner itself changes.

This commit is ci:, so merging it cuts no release and deploys nothing. Nothing releasable has
landed since v1.4.2. The first live run is the next feat/fix release, or Redeploy, which rolls
out v1.4.2.

Docs: RunicGateway/docs PR (modules/uo/README.md), opened alongside.

How it was tested

  • YAML parsed; job graph, outputs, needs and vars default checked.
  • The deploy script was extracted and run against a fake site dir with docker mocked, but using
    the real v1.4.1 manifest and core's real semver.js / version.js. 12/12 cases:
    • append to a .env with no MODULES line
    • rewrite while keeping a rust@ entry
    • inline # comment on the line
    • rollback after a failed resolve
    • no earlier version to roll back to
    • already deployed (no-op)
    • duplicate MODULES lines (refused)
    • compat skip with a fake old core
    • manifest 404
    • quiet LOG_LEVEL=warn
    • compose environment: override (refused before editing)
    • failed write (original restored)
  • Plan step run in a clone: redeploy dispatch (outputs deploy=true, release=false) and a normal push.
  • Independent review (reviewer agent): "ship after fixes", no blockers. All 7 findings were fixed:
    quiet log level, write verification, mawk-safe awk, override pre-check, inline comments, narrower
    log dump, a misleading message.
  • Not tested: a live run on uom-deploy-runner. I can't reach that host. Unknowns: that the
    runner user can write .env, and that cmp/awk/paste exist there.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t

## What & why The website rolls the uom site onto every new core image (the `deploy` job in `build-images.yml`, on `uom-deploy-runner`). This does the same for the uo module: after a release is published, a `deploy-uom` job rolls the uom site onto it. It does not unpack anything itself. Core already resolves `MODULES=uo@<version>=<manifest URL>` at every start (fetch, verify the sha256, unpack). The job only moves that line and restarts: 1. **Compat gate.** Inside the running app container, it checks the release manifest's `coreApi` against core's `MODULE_API_VERSION`, using core's own `semver.js`. If they don't match it warns and changes nothing. *(decided: skip + warn)* 2. **`.env` edited in place.** It rewrites the `uo@…` entry of the `MODULES` line and keeps any other entries. If there is no line it appends one: uo is admin-installed on that site today, so the first deploy appends. The file keeps its owner and mode. It refuses to run if `MODULES` appears twice, or if it comes from compose `environment:` (which would win over `.env`). A write that doesn't land intact puts the original back. The log only ever shows `id@version`. *(decided: edit `.env` in place)* 3. Recreates **only the app container** and waits for `registered module "uo" v<version>`. If `LOG_LEVEL` is `warn` or `error` it checks the version on the volume instead. 4. **Rollback (added by me, not asked for).** If the new version doesn't come up, it declares the version that was running, recreates again, and fails the job. Easy to drop if you'd rather it just fail. **Redeploy button:** Run workflow with `redeploy = true` publishes nothing and deploys the newest tag. Use it after a skipped deploy. *(decided: every release + manual)* The site directory defaults to `/home/perry/website`; the Actions variable `UOM_SITE_DIR` overrides it. Nothing on the runner itself changes. This commit is `ci:`, so merging it **cuts no release and deploys nothing**. Nothing releasable has landed since v1.4.2. The first live run is the next `feat`/`fix` release, or Redeploy, which rolls out v1.4.2. Docs: RunicGateway/docs PR (modules/uo/README.md), opened alongside. ## How it was tested - YAML parsed; job graph, outputs, `needs` and `vars` default checked. - The deploy script was extracted and run against a fake site dir with `docker` mocked, but using the **real v1.4.1 manifest** and core's **real** `semver.js` / `version.js`. 12/12 cases: - append to a `.env` with no MODULES line - rewrite while keeping a `rust@` entry - inline `# comment` on the line - rollback after a failed resolve - no earlier version to roll back to - already deployed (no-op) - duplicate MODULES lines (refused) - compat skip with a fake old core - manifest 404 - quiet `LOG_LEVEL=warn` - compose `environment:` override (refused before editing) - failed write (original restored) - Plan step run in a clone: redeploy dispatch (outputs `deploy=true`, `release=false`) and a normal push. - Independent review (reviewer agent): "ship after fixes", no blockers. All 7 findings were fixed: quiet log level, write verification, mawk-safe awk, override pre-check, inline comments, narrower log dump, a misleading message. - **Not tested:** a live run on `uom-deploy-runner`. I can't reach that host. Unknowns: that the runner user can write `.env`, and that `cmp`/`awk`/`paste` exist there. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t
wtclaude added 1 commit 2026-11-27 14:57:30 -06:00
ci(release): roll every release onto the uom site
All checks were successful
PR Checks / client-build (pull_request) Successful in 37s
PR Checks / server-tests (pull_request) Successful in 47s
PR Checks / frozen-manifest (pull_request) Successful in 52s
5d408a4ee3
A deploy-uom job after the release, on uom-deploy-runner (the runner the
website's own deploy uses). It asks the running core whether it can load
the release (coreApi against MODULE_API_VERSION) and warns and changes
nothing if not; otherwise it rewrites the uo entry of MODULES in the site's
.env in place, recreates only the app container, and waits for core to
register the new version, rolling back to the previous one if it does not.

A redeploy dispatch input publishes nothing and rolls the newest release
out again, for a deploy that was skipped until the site's core caught up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t
whitlocktech merged commit 706d22ab78 into main 2026-11-27 14:58:32 -06:00
whitlocktech deleted branch feat/deploy-uom 2026-11-27 14:58:32 -06:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Module-uo#52
No description provided.