The agent as a container image (M1.5)
CI / checks (push) Skipped
CI / e2e (pull_request) Failing after 49m48s
CI / checks (pull_request) Successful in 10m0s
CI / image (pull_request) Successful in 27s

- Dockerfile: built with uv into /opt/nisse (installed, not editable),
  run on python:3.12-slim with openssh-client as user nisse; stateless,
  with state in a /var/lib/nisse-dev volume, config mounted at
  /etc/nisse-dev/nisse-dev.yaml, secrets as environment variables, keys
  mounted read-only. 202 MB. Its `test` stage adds the tests and their
  tools over the installed package (UV_NO_SYNC, so `uv run` never swaps
  in the source tree); the default target is the agent.
- scripts/e2e.sh --image REF runs the suite inside an image's test stage,
  on its own sshd.
- CI builds both images on every PR (nothing pushed); release.yml pushes
  gitea.dongar.net/dongar/nisse-dev:<tag> and :latest on a v* tag, with
  the REGISTRY_TOKEN secret.
- scripts/bringup.sh builds the code under test into an image and runs it
  in the systemd unit (root, $E2E mounted at its own path); `plan` prints
  what it would run; the build-VM set-aside reads the projects: config.

Checked: the image refuses to start without a config, runs as uid 10001;
one e2e test passed from the test stage (2m45s, $0).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
This commit is contained in:
dongarandClaude Opus 5.5 committed 2026-10-07 19:50:59 +00:00
1 parent 2d6aa98f87
commit 0660fa3c51
7 files changed
+205 -26

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
name: Release
# A tag v* publishes the agent's image to Gitea's registry (Development Plan
# M1.5, X4): gitea.dongar.net/dongar/nisse-dev:<tag> and :latest. The token
# is a secret (REGISTRY_TOKEN: write:package for REGISTRY_USER); the
# account is a setting, so it's here.
on:
push:
tags: ["v*"]
env:
REGISTRY: gitea.dongar.net
REGISTRY_USER: dongar
IMAGE: gitea.dongar.net/dongar/nisse-dev
jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
docker build --target agent \
--label org.opencontainers.image.revision="${{ github.sha }}" \
--label org.opencontainers.image.version="${{ github.ref_name }}" \
-t "$IMAGE:${{ github.ref_name }}" -t "$IMAGE:latest" .
- name: Push
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
printf '%s' "$REGISTRY_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin
docker push "$IMAGE:${{ github.ref_name }}"
docker push "$IMAGE:latest"
docker logout "$REGISTRY"