Commit Graph
45 Commits
Author SHA1 Message Date
mhoennigandClaude Opus 5 0e7f024de4 Record the host config cleanup that step 18 no longer has to do
The machine config on vm4006 lost its legacy branches block, renamed
builds.master to builds.nightly and moved build/libs into the default
definition's artifactDirs. Step 18 still described that work as pending
and named a rollback path to 0.9.18 that the file no longer supports.

What is left there is the shrinking to genuinely host-specific keys,
plus the open question where the nightly rebuild belongs once master
carries its own config.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-30 07:26:50 +02:00
mhoennig 3aad887b8e Record the v0.9.20 deployment to vm4006 2026-08-29 12:09:22 +02:00
mhoennig f0f996a53c A build definition says when it runs in a trigger block of its own
`onPush`, `atTimes`, `branches`, and `activeWithin` move into a nested
`trigger`. The split is structural on purpose: the inheritance from
`builds.default` now subtracts one key instead of a list of four, so a
selector added to `TriggerConfig` later is non-inheritable by
construction rather than because someone remembered to extend the list.

A definition still writing those keys flat is refused by name, per file
and scoped like the version check — the machine and project config abort
the start, a branch's committed config fails only that branch. Ignoring
them would leave the build with no trigger at all, which is a job that
quietly stops running: the failure this refusal exists to prevent.

Two more things a definition can now say:

- A `!` prefix in `trigger.branches` excludes, and an exclusion wins
  whatever the order. `["*", "!master"]` gives one branch a build of its
  own without the default build running over it as well — until now the
  only way out of that double build was to drop the second definition's
  push trigger.
- `statusContext` overrides the Gitea check this build reports as, empty
  keeping the repository-wide one. Two builds of a commit shared a
  context and overwrote each other's result, so a quick check beside a
  long build was not readable in Gitea. Pinned like `requirePullRequest`:
  a branch that could pick its context could take over the check a branch
  protection rule depends on.

Fixed on the way: a branch whose builds all belong to named definitions
rendered an empty row in the branches view, reading as "never built"
directly beside its real builds. That row was unreachable before the
exclusion patterns made such a branch possible.
2026-08-29 12:05:10 +02:00
mhoennig 0fbb25b47f Plan the trigger block together with the branches removal 2026-08-29 11:47:56 +02:00
mhoennig 767470430b Plan the removal of the legacy branches section (step 18) 2026-08-29 11:26:42 +02:00
mhoennig abd40dd00f Record the v0.9.19 deployment to vm4006 2026-08-29 11:23:03 +02:00
mhoennigandClaude Opus 5 f07a399f2e Record the v0.9.18 deployment to vm4006
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 10:19:16 +02:00
mhoennigandClaude Opus 5 fa183ef1db Record the v0.9.17 deployment to vm4006
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 08:37:43 +02:00
mhoennigandClaude Opus 5 cd0596b17a Record the v0.9.16 deployment to vm4006
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 08:12:01 +02:00
mhoennigandClaude Opus 5 08a8a0bbb4 Record the v0.9.15 deployment to vm4006
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 07:38:57 +02:00
mhoennigandClaude Fable 5 e118c239f8 Record the v0.9.14 deployment to vm4006
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 20:50:13 +02:00
mhoennigandClaude Fable 5 6f80190581 Record the v0.9.13 deployment to vm4006
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 19:16:22 +02:00
mhoennigandClaude f292badac1 Record the v0.9.12 deployment to vm4006
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-26 13:36:47 +02:00
mhoennigandClaude d2128afb6d Record the v0.9.11 deployment to vm4006
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 12:22:04 +02:00
mhoennigandClaude 903a87e547 Correct the runtime bundle's glibc rule: the JDK vendor sets the floor
ADR 0006 assumed the bundle inherits the build machine's glibc, which would
have blocked the Hostsharing Managed Webspace (glibc 2.36, dev machine 2.39).
Measuring all 33 ELF files of the produced bundle shows GLIBC_2.15 as the
highest required symbol version: jlink copies Temurin's prebuilt binaries
instead of compiling, so the floor is the JDK vendor's build environment and
the build machine's glibc is irrelevant unless the toolchain resolves to a
distribution-packaged JDK.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 10:23:15 +02:00
mhoennigandClaude c77de1c725 Record the webspace's bwrap and kernel versions, and the glibc consequence
bubblewrap 0.8.0 covers every option the sandbox design uses; only overlayfs is
missing, which the design does not need. The kernel version, however, points at
Debian 12 and thus a glibc older than the dev machine's, which would break the
jlink runtime bundle on that host -- noted as a check to run before deploying.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 10:21:00 +02:00
mhoennigandClaude 3f93882dda Record the passing bwrap precondition check on a Managed Webspace
Plan step 17 hinges on unprivileged user namespaces being usable on a
Hostsharing Managed Webspace. The check ran on h68 and passed with all three
expected signals, so the step is viable there and the sandbox design stands.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 10:19:21 +02:00
mhoennigandClaude cff365767e Plan step 17: run on a dedicated unix user, and cap the unit's resources
Hostsharing recommends assigning domains to separate domain admins rather
than to the package admin, and all their service guides (Mattermost,
Tomcat, Nextcloud) run the daemon as its own user. For GitTally the
argument is stronger: it checks out foreign commits and executes their
build scripts, so running as the package admin would undo the sandbox
rationale of this step. The service user has to be named when ordering
the daemon port anyway.

Also records a trap found on the way: the RAM contingent is a package
slice, not a per-user quota, so a dedicated user buys isolation but no
extra memory — a runaway Gradle build could starve the whole webspace.
The unit from `init --systemd` sets neither MemoryMax nor TasksMax today,
so adding them (configurable, empty = unset) becomes part of step 17.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 08:52:24 +02:00
mhoennigandClaude d5f2784b60 Plan step 17: web access on a Managed Webspace, alongside the sandbox
Keeping both halves in one step: a bubblewrap runtime alone would only
prove that sandboxed builds work somewhere, and web access alone would
mean builds running unsandboxed on the webspace. Neither ships value on
its own, so step 17 now covers the whole deployment.

The web half needs no code: Hostsharing provides Apache plus Let's
Encrypt and documents the reverse proxy to a self-hosted service, so the
managed nginx container of ADR 0005 is not used there. What it needs is
the booked "eigener Serverdienst" option with an assigned localhost port,
a systemd user unit (which `init --systemd` already generates), and a
`.htaccess` with a `[proxy]` RewriteRule — with sources from Hostsharing's
own wiki and feature pages. GitTally fits as is, because it builds
external links from `server.publicBaseUrl` rather than from the request,
so no forward-headers handling is required.

Two points are explicitly marked unverified in the step file: the
effective AllowOverride value and whether an unassigned port would bind.
Also ticks steps 15 and 16 in the plan index — both carry a Result
section and are long done.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 08:37:58 +02:00
mhoennigandClaude 960dc97e75 Record the v0.9.10 deployment to vm4006
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 08:08:15 +02:00
mhoennigandClaude ea0b67d331 Record the v0.9.9 deployment to vm4006
Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 07:45:45 +02:00
mhoennigandClaude Fable 5 daba7f6acc Record the v0.9.8 deployment to vm4006
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 21:37:30 +02:00
mhoennigandClaude Fable 5 962836beaf Stable per-branch report URLs and a reachable live view (v0.9.8)
A report directory holding a single page is now linked and served as a
directory, so Gradle's --profile report has a stable permanent URL although
its file name carries the build timestamp.

The permanent link moves to the build it resolves to — the branch's latest
green build — and appears on every build table instead of only the branches
view. The Current tab gave way to a link in the artifacts column, shown
while a build runs; /current itself stays routable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 21:27:53 +02:00
mhoennigandClaude Fable 5 632e4396e4 Plan step 17: bubblewrap build sandbox for Hostsharing Managed Webspaces
Third build runtime behind BuildRunner: unprivileged user namespace via
bwrap with a prepared Debian rootfs, for hosts without Docker or root.
The step starts with a one-line precondition check to run on the target
webspace; the step-16 git metadata mounts port 1:1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 20:42:48 +02:00
mhoennigandClaude Fable 5 355d8ae90f Record the vm2176 retirement and redirect setup in plan step 15
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 16:56:22 +02:00
mhoennigandClaude Fable 5 9e7982ce34 Add self-contained runtime bundle distribution (jlink) for hosts without Java
./gradlew runtimeBundle packs a jlink-trimmed JRE, gittally.jar, and a
launcher script into one tarball, unpacked to ~/opt/gittally on the target
host; init --systemd works from the bundle unchanged because java.home and
the running-jar path resolve into it. Chosen over a GraalVM native image
(Spring AOT evaluates bean conditions at build time, which cannot represent
the dual-context CLI/server wiring) and over a containerized runtime — see
ADR 0006 and docs/plan/15-runtime-bundle-distribution.md, which also records
the full vm2176-to-vm4006 migration walkthrough.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 15:35:35 +02:00
mhoennigandClaude Fable 5 8b71d0db8e Fix Docker builds under rootless daemons and expose git metadata to build containers
Two fixes from the vm4006 rollout (docs/plan/16-git-in-docker-builds.md):

Rootless daemons map the host user to container root, so running the build
container as --user <host-uid> put it into the subuid range and it could not
even create .gradle in a fresh worktree (legacy only worked because its
ownership-repair chown had accidentally moved build/ and .gradle/ into subuid
ownership in its reused primary checkout). The container now always runs as
--user 0: the unprivileged host user under rootless, real root under rootful
where the ownership repair still applies; under rootless it degenerates to 0:0.

Git now works inside build containers: the primary .git is mounted read-only
with .git/gittally/ masked by an empty tmpfs (git.token and the control token
stay unreachable, the workspace bind resurfaces only the build's own worktree)
and the worktree admin dir mounted read-write for index-refreshing commands.
Verified on vm4006: git log/status succeed, the machine config is invisible,
ref writes fail on the read-only mount.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 15:34:39 +02:00
mhoennig 66183f9765 Add build-phase timing and overhead optimization plan to docs 2026-08-10 13:32:17 +02:00
Michael HoennigandClaude Fable 5 b104eeee05 added opt-in managed nginx/TLS container (ADR 0005, plan step 13): server.nginx.* config serves GitTally over HTTPS on hosts without a reverse proxy — two-phase startup (ACME webroot via certbot container, then full HTTPS config), daily certificate renewal with nginx reload, labelled container removed on shutdown; all failures are non-fatal, the plain HTTP server keeps running
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 21:51:33 +02:00
Michael Hoennig d3a69a151a updated artifact links: added target="_blank" and rel="noopener noreferrer" to ensure external logs and reports open in a new tab; updated docs and tests accordingly 2026-07-07 15:39:59 +02:00
Michael Hoennig a659cd6764 reintroduced legacy Branches view: added /branches endpoint for listing origin branches and their latest builds (or unknown for never-built branches), updated UI with reload button and navigation, and enhanced API and tests 2026-07-07 15:16:01 +02:00
Michael Hoennig 142bc87604 added ADR 0005 and step 13: reintroduce managed nginx+certbot as an opt-in feature for hosts without a reverse proxy (e.g. Hostsharing); partially supersedes ADR 0004; updated plans, documentation, and migration guides 2026-07-07 14:40:11 +02:00
Michael Hoennig 60ff595a9d implemented 12-deployment.md: added systemd service generation (init --systemd) and migration guide from legacy script; introduced JSON-file persistence, server-rendered UI with polling, and reverse-proxy-based deployment; updated documentation 2026-07-07 14:18:41 +02:00
Michael Hoennig e869b46cbf implemented 11-docker-build-runtime.md: added optional Docker-based build execution with configuration, per-branch runtime selection, image rebuild on input changes, Gradle cache volume, and ownership repair; updated docs and configuration 2026-07-07 13:49:08 +02:00
Michael Hoennig 73221a8b8b implemented 10-cli-commands.md: added CLI commands for branch name resolution, one-shot builds, failed build retries, and build status reports; includes tests for functionality and edge cases 2026-07-07 13:19:29 +02:00
Michael Hoennig a6a2c9de0b implemented 09-system-metrics.md: added system metrics: introduced system monitoring with a metrics collector, REST API endpoint, Thymeleaf UI rendering, and lifecycle management 2026-07-07 12:55:11 +02:00
Michael Hoennig 25a0742a58 implemented 08-web-ui.md: added Thymeleaf-based web UI: templates for builds, artifacts, current builds, and fragments; static assets for favicon, CSS, and JavaScript 2026-07-07 12:23:12 +02:00
Michael Hoennig 490914de0b implemented 07-server-mode.md: added server profile with REST API for builds, artifacts, live logs, and control tokens; lifecycle management for watcher; controller and service tests 2026-07-07 11:27:27 +02:00
Michael HoennigandClaude Fable 5 a1db450bdb implemented 06-watcher.md: non-blocking poll cycle enqueueing changed/new/auto-build branches via the async executor, startup recovery, retention/worktree pruning, JSON auto-build slot state, watcher.pollInterval config, and watcher health state
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 10:28:28 +02:00
Michael HoennigandClaude Fable 5 3c9eeda5da implemented 05-artifact-store.md: filesystem artifact store with legacy-compatible naming, atomic persist from concurrent builds, retention pruning, and artifacts.rootDir config
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 10:08:40 +02:00
Michael HoennigandClaude Fable 5 b379bc0a6b implemented 04-build-executor.md incl. concurrency amendment: async builds in per-branch worktrees, builds.maxConcurrent, cancellation, live logs; fix .gitignore build/ rule that silently excluded the de.hoennig.gittally.build package (also recovers the step-01 domain files)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-07 08:43:28 +02:00
Michael Hoennig ae3ae7aa04 implemented 03-gitea-client.md: added Gitea API client for commit statuses, status mapping, and extensive tests 2026-07-07 07:34:18 +02:00
Michael Hoennig a427665ce8 implemented 02-git-gateway.md: added Git access layer with credentials bridge, duration parser, and extensive tests 2026-07-07 07:10:38 +02:00
Michael Hoennig f4a6ec9194 implemented 01-build-state-domain: add execution notes and jackson-datatype-jsr310 dependency 2026-07-07 06:53:04 +02:00
Michael Hoennig 38e080814e update CLAUDE.md with rewrite plan documentation reference in docs/pland directory 2026-07-07 06:40:27 +02:00