~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Each release's image is built and published here; nothing here deploys

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:release/image-build

Each release's image is now built and published by this repository, the way monolith does it, and this repository no longer deploys anything. Once a Release pull lands and its checks pass, release builds the console, group-host and atgrp, assembles the Dockerfile's last stage with no container engine, and publishes it as knotless.dev/chadtmiller.com/group-host:<version>. next.opensocial.fyi runs whichever version hetzner-infra names (pull "opensocial: group-host runs the release this stack names, pulled from knotless.dev").

Claude Opus 5.5 · high effort

What changes

  • .knotless/workflows/release.yml runs on runner.knotless.dev for pushes to main that change Cargo.toml, after check, test, web, lexicons, e2e and docs.
    • It publishes when main's version has a CHANGELOG.md section and no release yet.
    • It builds the console (npm run build), then group-host and atgrp in the deploy profile with GROUP_HOST_COMMIT, makes the image, and publishes it with knotless release publish --oci. The version's changelog section is the release's notes.
    • Asked for on another branch, it builds and publishes nothing.
  • .knotless/image.sh is monolith's, adapted. It assembles an OCI layout with crane and jq from node:24.22.1-bookworm-slim, pinned by digest, plus one layer:
    • /usr/local/bin/{group-host,atgrp}, /app/build, /app/package.json, a static tini at /usr/bin/tini (0.19.0, sha256-pinned) and the CA bundle at /etc/ssl/certs;
    • /data, owned by 1000;
    • the Dockerfile's user (node), env (DATA_DIR, PORT), workdir (/app), entry point (tini --) and command (group-host).
    • Labels and annotations name the version, the commit and the base digest. The Dockerfile says to change image.sh along with its last stage.
  • .knotless/workflows/deploy.yml is removed. So are the comments in every other workflow about ci.knotless.dev running it.
  • Docs: docs/development.md's "The image" replaces "The deploy and its image", and AGENTS.md's CI section describes release instead of deploy.

How it was checked

  • knotless run rerun --ref refs/heads/release/image-build --workflow release passed on 242786b. It built everything in about a minute and a half (warm cache) and made the image: group-host 0.2.0 at 242786b, on node:24.22.1-bookworm-slim@sha256:e158…5e7d, manifest sha256:f12a…9721. It skipped publishing, as on any branch but main.
  • just docs reports 0 problems.

Shortcomings

  • Unrun image: the image hasn't been pulled and run yet. That happens when 0.3.0 is published and hetzner-infra puts it up.
  • Secret needed: RELEASE_PASSWORD has to be sealed to runner.knotless.dev for refs/heads/main before the first publish. Without it, the publish step fails.
  • Left to remove: GROUP_HOST_DEPLOY_KEY, and ci.knotless.dev among this repository's runners, are unused now.
Asked for changes

This pull moves the image build into a release workflow. image.sh assembles the OCI image with no engine. deploy.yml goes, and the docs follow.

One thing needs to change before it merges. release.yml builds group-host and atgrp in rust:1.100, but the Dockerfile builds them in rust:1.100-bookworm, and the image's base is node:24.22.1-bookworm-slim. The bare rust:1.100 tag follows Debian stable, which is trixie by now. If so, the binaries link against a newer glibc than bookworm has and fail at start with GLIBC_2.xx not found. image.sh says its binaries are "built against bookworm's glibc", but nothing here makes that so. The PR also says the image hasn't been run, and the first pull would be the first test. Use rust:1.100-bookworm for this workflow, or confirm that rust:1.100 is bookworm. The tag also decides which ca-certificates.crt and jq the build host supplies, which is a minor point.

I read all the files in the diff and found nothing else I'm sure of.

.knotless/workflows/release.ymlline 22Outdated
# for pushes to main alone. Asked for on another branch, `knotless run
# rerun knotless://chadtmiller.com/group-host --ref refs/heads/<branch>
# --workflow release`, it builds the image and publishes nothing.
image: rust:1.100
review.knotless.dev

The Dockerfile builds in rust:1.100-bookworm and runs on a bookworm base. If bare rust:1.100 is now trixie, these binaries need a newer glibc than the image has. Pin -bookworm here.

Approved

My earlier request is done. release.yml now builds in rust:1.100-bookworm, which matches the Dockerfile and the image's base. It also builds into target/bookworm, so a cached build from another Debian can't be reused. image.sh is pointed at target/bookworm/deploy, and no other path in the workflows still uses target/deploy. I found nothing new. The image is still unrun and RELEASE_PASSWORD still has to be sealed before the first publish, as the body says.

Merged as 96a8031