[fabrica] Release: the release pipeline on a v* tag (version check, web tests, fabrica notes, the shots, approval, publish under SHA256SUMS signed by domi-release) and the highlights of 0.1.0
This commit is contained in:
@@ -0,0 +1,44 @@
|
|||||||
|
# Ianitor Domi: the Gitea release of a v* tag (docs/release.md). Ianitor ships no binary (the server builds it with
|
||||||
|
# Nix and the deploy pipeline switches it in), so a release is its notes and screenshots of the web UI, published under
|
||||||
|
# a SHA256SUMS signed by domi-release through Custos; release-notes.md is also the release's text on Gitea.
|
||||||
|
# The Windows runner (the Fabrica app on Mark's PC) runs it: `fabrica`, node and pnpm are on every step's PATH.
|
||||||
|
# No Gitea webhook to the hub yet: a pushed tag is started on demand (the hub's POST /api/runs, ref v<version>).
|
||||||
|
# `notes` is Fabrica's release notes since the previous v* tag (Fabrica docs/12_release_kit.md); `shots` takes the
|
||||||
|
# same files as `fabrica aula shots` (core docs/FORMATS.md, "Fabrica: the Aula page") from the built web UI against
|
||||||
|
# the demo control plane with invented data, in headless Edge. No landing page while app.yaml has no `aula: true`.
|
||||||
|
name: release
|
||||||
|
on:
|
||||||
|
tag: "v*"
|
||||||
|
manual: true
|
||||||
|
runner: windows
|
||||||
|
steps:
|
||||||
|
- id: version
|
||||||
|
run: node scripts/check-version.mjs ${{ version }}
|
||||||
|
- id: install
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
- id: check
|
||||||
|
needs: [install]
|
||||||
|
run: pnpm --filter web check
|
||||||
|
- id: test
|
||||||
|
needs: [install]
|
||||||
|
run: pnpm --filter web test
|
||||||
|
- id: notes
|
||||||
|
run: fabrica notes
|
||||||
|
artifacts: ["target/notes/release-notes.md", "target/notes/release-notes.json"]
|
||||||
|
- id: shots
|
||||||
|
needs: [check, test]
|
||||||
|
run: node apps/web/scripts/shots.mjs
|
||||||
|
artifacts: ["target/aula/aula-*.png", "target/aula/aula.json"]
|
||||||
|
- id: approve
|
||||||
|
needs: [version, notes, shots]
|
||||||
|
approve: "Publish Ianitor ${{ tag }}: its notes and screenshots?"
|
||||||
|
- id: publish
|
||||||
|
needs: [approve]
|
||||||
|
publish:
|
||||||
|
gitea-release: true
|
||||||
|
files:
|
||||||
|
- "**/release-notes.md"
|
||||||
|
- "**/release-notes.json"
|
||||||
|
- "**/aula-*.png"
|
||||||
|
- "**/aula.json"
|
||||||
|
sums: domi-release
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
The first release of Ianitor Domi: a reverse proxy for a home server, built on Cloudflare's Pingora, with Caddy as a
|
||||||
|
tested fallback, a small Domi certificate authority, and a web UI where every change takes three clicks or fewer.
|
||||||
|
|
||||||
|
- **Hosts in plain words.** Add a host, say where its traffic goes, pick a Domi or Let's Encrypt certificate and
|
||||||
|
whether visitors sign in first (Authelia forward-auth). Each host is checked for health and shows healthy,
|
||||||
|
degraded or down.
|
||||||
|
- **Changes that undo themselves.** Every change is compiled, tried, and watched for 60 seconds; if a host stops
|
||||||
|
answering, it is reverted on its own. Routes live in a git repository, one file per host, with Undo and a
|
||||||
|
history you can restore any kept version from.
|
||||||
|
- **Two engines.** Pingora serves; Caddy is built from the same routes, compared host by host, and can take over at
|
||||||
|
runtime in about two seconds.
|
||||||
|
- **The Domi CA.** Certificates for hosts reached only from home, and device certificates (mTLS) for phones,
|
||||||
|
computers and Domi apps, from an intermediate whose root stays offline.
|
||||||
|
- **Share links**, signed and time-limited, for a single host.
|
||||||
|
- **NixOS-native.** A flake with the module and VM tests; deployed through Fabrica.
|
||||||
|
|
||||||
|
The changes below are the merges since the first commit; PR 3 to 5 are the control plane (phase 2), the decisions
|
||||||
|
on the open points, and the web UI, the Domi CA and the NixOS module (phase 3).
|
||||||
@@ -13,11 +13,14 @@ tests/diff same requests against Ianitor and Caddy, responses compared.
|
|||||||
tests/support shared test fixtures (test CA, upstreams, mock Authelia, clients); test-only.
|
tests/support shared test fixtures (test CA, upstreams, mock Authelia, clients); test-only.
|
||||||
tests/fuzz cargo-fuzz targets.
|
tests/fuzz cargo-fuzz targets.
|
||||||
deploy/nixos NixOS module + VM tests.
|
deploy/nixos NixOS module + VM tests.
|
||||||
|
scripts the release's version check. Releases (notes, screenshots): docs/release.md.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
cargo test --workspace # quote test counts per crate; an exit code alone is not green
|
cargo test --workspace # quote test counts per crate; an exit code alone is not green
|
||||||
cargo run -p ianitor-control -- --dev
|
cargo run -p ianitor-control -- --dev
|
||||||
pnpm --filter web dev # 127.0.0.1 only, never --host
|
pnpm --filter web dev # 127.0.0.1 only, never --host
|
||||||
|
node apps/web/scripts/shots.mjs # the release's screenshots (demo data, headless Edge) -> target/aula (docs/release.md)
|
||||||
|
node scripts/check-version.mjs X.Y.Z # Cargo.toml and both package.json carry the version
|
||||||
nix build .#ianitor
|
nix build .#ianitor
|
||||||
nix flake check # includes NixOS VM tests (Linux + KVM)
|
nix flake check # includes NixOS VM tests (Linux + KVM)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
// The release's version check (docs/release.md): every place that carries Ianitor's version agrees,
|
||||||
|
// and, given a version (the tag's, e.g. 0.1.0 for v0.1.0), is that version.
|
||||||
|
// node scripts/check-version.mjs [X.Y.Z]
|
||||||
|
// Exit codes: 0 they agree, 1 they do not, 2 usage.
|
||||||
|
|
||||||
|
import { readFileSync } from "node:fs";
|
||||||
|
import { dirname, join, resolve } from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
|
const repo = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
||||||
|
const want = process.argv[2];
|
||||||
|
if (process.argv.length > 3 || (want !== undefined && !/^\d+\.\d+\.\d+$/.test(want))) {
|
||||||
|
console.error("usage: node scripts/check-version.mjs [X.Y.Z]");
|
||||||
|
process.exit(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
function cargo() {
|
||||||
|
const text = readFileSync(join(repo, "Cargo.toml"), "utf8");
|
||||||
|
const section = /^\[workspace\.package\]\s*$([\s\S]*?)(?=^\[|(?![\s\S]))/m.exec(text);
|
||||||
|
const v = section && /^version\s*=\s*"([^"]*)"\s*$/m.exec(section[1]);
|
||||||
|
return v ? v[1] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const pkg = (p) => JSON.parse(readFileSync(join(repo, p), "utf8")).version ?? null;
|
||||||
|
|
||||||
|
const found = [
|
||||||
|
["Cargo.toml [workspace.package]", cargo()],
|
||||||
|
["apps/web/package.json", pkg("apps/web/package.json")],
|
||||||
|
["packages/ui/package.json", pkg("packages/ui/package.json")],
|
||||||
|
];
|
||||||
|
|
||||||
|
const expected = want ?? found[0][1];
|
||||||
|
const wrong = found.filter(([, v]) => v !== expected);
|
||||||
|
for (const [where, v] of found) console.log(`${where}: ${v ?? "(none)"}`);
|
||||||
|
if (wrong.length) {
|
||||||
|
console.error(`version: expected ${expected} everywhere; ${wrong.map(([w, v]) => `${w} has ${v ?? "none"}`).join(", ")}`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
console.log(`version: ${expected} everywhere`);
|
||||||
Reference in New Issue
Block a user