Drops the inline-build images for the upstream services. The compose now references the published images directly (openzaak/open-zaak, openzaak/open-notificaties, keycloak, curl, flowable-rest) with no build for them, and the config they need is streamed into external named volumes by infra/seed-config.sh: rr-oz-config -> oz-init /app/setup_configuration (data.yaml) rr-kc-realms -> keycloak /opt/keycloak/data/import (realm exports) rr-fl-bpmn -> flowable-init /work (registratie.bpmn) How: the seeder creates each volume, `docker create`s a throwaway helper that mounts it, `docker cp`s the files in, and removes it. docker cp streams over the Docker API, so it works in Docker-in-Docker (the CI runner) where bind mounts mount empty. It uses plain `docker create`/`cp` — NOT `docker compose create`, which podman-compose (local dev) lacks. `external: true` fixed names keep the volumes identical across docker compose and podman-compose. Consequence: bare `docker compose up` no longer self-seeds, so use `make up` (seeds then starts). Every `*-up` target seeds first; `*-down` removes the external volume. acl/bff are still built (they're our apps, not upstream images). Verified end-to-end on podman-compose: `make keycloak-up` seeds rr-kc-realms, the upstream Keycloak mounts it, and --import-realm imports all four realms (digid realm returns 200). Seeder runs in ~2s. Docs updated: gitea-actions-gotchas.md, ci.md, openzaak.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
81 lines
3.4 KiB
Markdown
81 lines
3.4 KiB
Markdown
# CI runbook — Gitea Actions
|
|
|
|
> **Status: active.** The workflow `.gitea/workflows/ci.yaml` runs on Gitea's
|
|
> hosted `ubuntu-latest` runner — no self-hosted runner required.
|
|
> **`make ci` is still the local gate** — it runs the exact same checks
|
|
> (the workflow calls the same `make` targets).
|
|
|
|
## The pipeline
|
|
|
|
`.gitea/workflows/ci.yaml` runs on every push and pull request to `main`. Each job
|
|
calls a `make` target — the **single source of truth** for the checks, so local
|
|
and CI cannot drift:
|
|
|
|
| Job | Target | Needs |
|
|
|---|---|---|
|
|
| `lint` | `make lint` → `dotnet format … --verify-no-changes` | .NET 10 SDK |
|
|
| `build` | `make build` → `dotnet build … -c Release` | .NET 10 SDK |
|
|
| `unit` | `make unit` → `dotnet test … -c Release` | .NET 10 SDK |
|
|
| `compose-smoke` | `make smoke` → seed config volumes → `up -d` (full stack) → `up --wait` durable services → `down` | container engine + compose v2 |
|
|
|
|
All `uses:` references are absolute, tag-pinned URLs (`https://github.com/actions/checkout@v4`,
|
|
`https://github.com/actions/setup-dotnet@v4`) per CLAUDE.md §8.7 and §15 — Gitea
|
|
Actions resolves them from GitHub.
|
|
|
|
> **`compose-smoke` runs on a containerized runner.** Workspace bind mounts do
|
|
> **not** reach the sibling containers Compose starts, so config/assets are
|
|
> streamed into external named volumes via `docker cp` (`infra/seed-config.sh`),
|
|
> and the upstream images are used verbatim (no build). If you add a service that
|
|
> needs a repo file at runtime, seed it the same way — don't bind-mount it. Note:
|
|
> bare `docker compose up` no longer self-seeds; use `make up`. See
|
|
> [gitea-actions-gotchas.md](gitea-actions-gotchas.md).
|
|
|
|
## Running CI locally (`make ci`)
|
|
|
|
Until the runner exists, run the full pipeline yourself before pushing:
|
|
|
|
```bash
|
|
make ci # lint + build + unit + smoke — what the pipeline runs
|
|
make lint # or a single stage
|
|
make smoke # compose up --wait, curl /health, tear down
|
|
```
|
|
|
|
**Prerequisites:** .NET 10 SDK, a container engine with Compose v2, and `curl`.
|
|
|
|
On a **rootless Podman** box (the default dev setup here), the `smoke` target needs
|
|
the Podman API socket and a Compose provider:
|
|
|
|
```bash
|
|
systemctl --user enable --now podman.socket # start the API socket
|
|
ln -sf "$(command -v podman)" ~/.local/bin/docker # docker -> podman shim
|
|
# install Docker Compose v2 into ~/.local/bin as `docker-compose` (the provider)
|
|
```
|
|
|
|
The Makefile auto-points `DOCKER_HOST` at `/run/user/$(id -u)/podman/podman.sock`
|
|
when that socket exists and `DOCKER_HOST` is unset, so `make smoke` "just works"
|
|
locally while leaving real Docker hosts / CI runners untouched.
|
|
|
|
## Runner: `ubuntu-latest`
|
|
|
|
All jobs run on Gitea's hosted **`ubuntu-latest`** runner — no self-hosted runner
|
|
setup is required. The hosted runner ships with Docker and Docker Compose v2, so
|
|
`make smoke` (`docker compose … up --wait`) works without extra configuration.
|
|
|
|
If Gitea's hosted runners are unavailable and a self-hosted fallback is needed,
|
|
register an `act_runner` with the `ubuntu-latest` label:
|
|
|
|
```bash
|
|
VER=0.2.11
|
|
curl -fsSL -o /usr/local/bin/act_runner \
|
|
"https://dl.gitea.com/act_runner/${VER}/act_runner-${VER}-linux-amd64"
|
|
chmod +x /usr/local/bin/act_runner
|
|
|
|
act_runner register --no-interactive \
|
|
--instance https://git.labs.respellion.tech \
|
|
--token <REGISTRATION_TOKEN> \
|
|
--name respellion-ci-1 \
|
|
--labels "ubuntu-latest:docker://node:20-bookworm"
|
|
|
|
act_runner daemon
|
|
```
|