Release tests, script refactor and conventions #14

Merged
mathias.kessler merged 16 commits from develop into main 2026-11-03 19:32:29 +01:00
Member

Refs #7, #10

Warum

Auf develop liegen seit dem letzten Release die Angleichung an die gemeinsamen Konventionen, der Umbau der Container-Skripte, ein Bugfix und die neue Testsuite. Mit diesem PR gehen sie als Release raus.

Was

  • Gemeinsame Regeln liegen jetzt im Repo konventionen, die fehlenden Vorlagendateien sind ergänzt (#8)
  • Image nach den Docker-Konventionen (#9):
    • OCI-Labels
    • Build-Argument BUILD_DATUM heißt jetzt BUILD_DATE
    • neuer HEALTHCHECK über gesundheit
    • kein eigener Containername mehr im Login-Hinweis
  • entrypoint.sh und forgejo-sync in dokumentierte Schritte zerlegt, ohne dass sich das Verhalten ändert (#11)
  • Die Kopie der Konventionen wird neu geklont, wenn KONVENTIONEN_REPO auf ein anderes Repo zeigt (#12, Issue #10)
  • bats-Testsuite für Entrypoint, forgejo-sync und Hilfsskripte, dazu der Workflow test.yaml für PRs und develop (#13)

Die Umgebungsvariablen und ihre Defaults sind gleich geblieben, die Compose im Homelab braucht keine Anpassung.

Geprüft

  • CI auf develop (d336f25): test / scripts und test / image grün
  • Konfliktfrei mit main: git merge-tree

Nach dem Merge

  • build.yaml veröffentlicht das Image als 2026.11.4 und latest und legt Tag und Release an. Der nächtliche Deploy im Homelab zieht es.
  • Der Container meldet ab dann einen Health-Status. Es lohnt ein Blick, ob er nach dem ersten Start auf healthy geht.
  • Merge-Art: Merge-Commit.
Refs #7, #10 ## Warum Auf `develop` liegen seit dem letzten Release die Angleichung an die gemeinsamen Konventionen, der Umbau der Container-Skripte, ein Bugfix und die neue Testsuite. Mit diesem PR gehen sie als Release raus. ## Was - Gemeinsame Regeln liegen jetzt im Repo `konventionen`, die fehlenden Vorlagendateien sind ergänzt (#8) - Image nach den Docker-Konventionen (#9): - OCI-Labels - Build-Argument `BUILD_DATUM` heißt jetzt `BUILD_DATE` - neuer `HEALTHCHECK` über `gesundheit` - kein eigener Containername mehr im Login-Hinweis - `entrypoint.sh` und `forgejo-sync` in dokumentierte Schritte zerlegt, ohne dass sich das Verhalten ändert (#11) - Die Kopie der Konventionen wird neu geklont, wenn `KONVENTIONEN_REPO` auf ein anderes Repo zeigt (#12, Issue #10) - bats-Testsuite für Entrypoint, `forgejo-sync` und Hilfsskripte, dazu der Workflow `test.yaml` für PRs und `develop` (#13) Die Umgebungsvariablen und ihre Defaults sind gleich geblieben, die Compose im Homelab braucht keine Anpassung. ## Geprüft - CI auf `develop` (d336f25): `test / scripts` und `test / image` grün - Konfliktfrei mit `main`: `git merge-tree` ## Nach dem Merge - `build.yaml` veröffentlicht das Image als `2026.11.4` und `latest` und legt Tag und Release an. Der nächtliche Deploy im Homelab zieht es. - Der Container meldet ab dann einen Health-Status. Es lohnt ein Blick, ob er nach dem ersten Start auf `healthy` geht. - Merge-Art: Merge-Commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md now only describes this repository. Git flow, merge style,
language, commit, PR and issue rules live in the konventionen repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repository lacked the editor settings and the issue and pull request
templates from the shared conventions. The ignore files follow the
templates, the build context additionally skips .gitignore and
.editorconfig as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README named the own registry and setup and could not serve as a
Docker Hub description, the Dockerfile set no OCI labels and had no
health check of its own. The labels are now declared with build
arguments the workflow fills, placed after the cached layers so the
changing build time does not invalidate them. The README documents
usage, variables, volumes and platforms with placeholders, and the
workflow and Dockerfile are in English.

The build argument BUILD_DATUM is renamed to BUILD_DATE and the manual
workflow input kein_cache=ja to no_cache=yes.

Refs #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hint named the container of the home setup. A placeholder works for
any deployment.

Refs #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
entrypoint.sh was one long script with the German workspace texts as
heredocs in the middle of the logic. The texts and the default settings
now live in templates/, the script runs through named, documented
functions and is in English like forgejo-sync, the health check and the
credential helper. The PID file is renamed to /tmp/main.pid together
with the health check that reads it.

Behaviour is unchanged: the generated CLAUDE.md, settings, Git config,
nss files, called commands and exit codes match the previous version in
30 entrypoint scenarios, and forgejo-sync produced the same workspace
in six runs against Forgejo. Only the log messages changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed-on: #9
Reviewed-on: #11
Reviewed-on: #8
forgejo-sync only fetched origin of an existing .konventionen copy, so a changed or unreachable KONVENTIONEN_REPO went unnoticed.

Refs #10
Reviewed-on: #12
The scripts had no tests, and a broken entrypoint stops the container
that runs the remote session. The tests run the start with stubs, the sync
against a fake Forgejo and the helpers, all with dash as in the image.
Until now a broken script or Dockerfile only showed up in the release
build on main.
Document the test suite
All checks were successful
test / scripts (pull_request) Successful in 34s
test / image (pull_request) Successful in 16s
4f0388eb7e
Merge pull request 'Add bats test suite and test workflow' (#13) from chore/testsuite into develop
All checks were successful
test / image (push) Successful in 7s
test / scripts (push) Successful in 34s
test / image (pull_request) Successful in 5s
test / scripts (pull_request) Successful in 33s
d336f25f9d
Reviewed-on: #13
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
makeitsystems/claude-code!14
No description provided.