Commit Graph
354 Commits
Author SHA1 Message Date
Environment TestandClaude Sonnet 4.6 1530788dbe feat(mirror): add repository segment to GHCR image path
Image names now follow {owner}/{repository}/mirror/{registry}/{name}
instead of {owner}/mirror/{registry}/{name}.

- GHCRProvider: add `repository` param + `add_args()`/`from_args()` classmethods
  as SPOT for CLI argument registration and provider construction
- sync, resolver: use GHCRProvider.add_args() / from_args() (no duplication)
- Workflows: resolve repository name via scripts/meta/resolve/repository/name.sh
  and pass --ghcr-repository to sync and publish
- mirrors.sh: require and forward GHCR_REPOSITORY env var
- deploy/development/mirrors.py: derive repository from GITHUB_REPOSITORY
- Tests: update expected paths, argv and env fixtures

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 00:20:41 +02:00
Environment TestandClaude Sonnet 4.6 9ea2ad6ff1 refactor(docker): introduce utils/docker/image_discovery as single SPOT for image enumeration
- Move iter_role_images + all helpers + ImageRef from cli/mirror/util.py and
  cli/mirror/model.py into utils/docker/image_discovery.py; add source_file field
  to ImageRef to distinguish config/main.yml vs vars/main.yml entries
- Delete cli/mirror/util.py; update all callers to import from utils.docker.image_discovery
- Move utils into subpackages: utils/docker/ (image_ref, paths_utils, hadolint) and
  utils/roles/ (dependency_resolver, resource_validation); update all imports
- Reorganise tests into subpackages: tests/lint/docker/dockerfile/, tests/integration/docker/,
  tests/unit/utils/docker/, tests/unit/utils/roles/; fix parents[N] offsets after relocation
- tests/lint/docker/test_image_versions.py now uses iter_role_images (same SPOT as mirror)
- Add vars/main.yml images.<name>.{image,version} support for non-application roles
  (test-e2e-playwright, sys-ctl-hlth-csp); eliminate hardcoded duplicates in defaults/tasks
- Add web-app-matrix matrix-chatgpt-bot and web-app-mini-qr mini-qr entries in config/main.yml;
  replace hardcoded image strings in vars/templates with lookup('config', ...) references
- Fix sync/__main__.py log line to use correct registry prefix for non-Docker-Hub images
- Update docs/contributing/code/role/dockerfile.md with image declaration rules and SPOT reference

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 19:32:31 +02:00
Environment TestandClaude Sonnet 4.6 a721e87212 fix(tests): replace lint-based pre-commit test with a proper failing unit test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 02:33:22 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 e84bb3fe06 fix(env): unset cached env vars before reload and guard commit test against dirty worktree
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 02:08:39 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 434aa81ee2 fix(tests): ensure git safe.directory is configured before each environment step
Add ensure_git_safe_directory helper to lib.sh that detects dubious
ownership warnings in mounted containers and adds safe.directory to
the global git config. Call it on lib load and before each step in
the orchestrator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 01:05:11 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 f4b116224e fix(ci): enable CodeQL file coverage on pull requests
Opts out of the April 2026 default change that skips file coverage
computation on PRs by setting CODEQL_ACTION_FILE_COVERAGE_ON_PRS=true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 00:11:11 +02:00
kevinveenbirkenbach bbaf119640 split git bootstrap into dedicated environment step 2026-04-08 23:42:09 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 9a2878e109 refactor(ci): extract debug auth mode step into separate script
Move inline shell from entry-pull-request-change.yml into
scripts/meta/debug/auth_mode.sh and pass secrets via env vars.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 22:08:34 +02:00
kevinveenbirkenbach c97f1d84e0 fix(install): ensure venv python is used for pip and pre-commit
Reload env layer in install scripts after venv creation so `PYTHON`
points to the virtualenv instead of the system interpreter.

* Reload env in `python.sh` before installing dependencies
* Reload env in `pre-commit.sh` before installing hooks
* Reset env cache flags to force re-evaluation
* Keep centralized environment resolution (no hardcoding)

Fixes PEP 668 `externally-managed-environment` errors and missing
`pre_commit` module during hook installation.
2026-04-08 21:21:37 +02:00
kevinveenbirkenbach b0b8874bad feat(python): reload env after venv creation to ensure pip uses virtualenv
Fixes an issue where `PYTHON` could still point to the system interpreter
when `scripts/install/python.sh` runs after `install-venv`.

* Reload env layer if venv exists and PYTHON is not yet pointing to it
* Reset env caching flags to force re-evaluation
* Preserve central environment resolution logic (no hardcoding)

This resolves Debian/PEP 668 `externally-managed-environment` errors during pip install.
2026-04-08 20:30:35 +02:00
kevinveenbirkenbach 3dc243fb0d fix dependabot coverage and environment test scripts 2026-04-08 18:01:42 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 821c3c53b6 feat(pre-commit): introduce pre-commit hook enforcement and modular environment test suite
- Add .pre-commit-config.yaml running make test on non-doc changes
- Add pre-commit to pyproject.toml dev dependencies
- Add scripts/install/pre-commit.sh for hook registration
- Add install-python-dev Makefile target; wire into environment-bootstrap
- Rename setup-development → mark-development (env.ci override marker)
- Refactor scripts/tests/environment.sh into modular 00–10 scripts with orchestrator
- Add 09_commit.sh validating pre-commit enforcement and --no-verify bypass
- Update docs/agents/action/commit.md and testing.md for new hook behavior
- Update makefile.md, setup.md, installation.md accordingly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 16:58:24 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 769e3079d9 fix(pr): allow dependabot branch prefix for full CI scope
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 15:40:45 +02:00
kevinveenbirkenbach 862493f4e2 Refactor network stack refresh helpers 2026-03-31 23:55:35 +02:00
kevinveenbirkenbach 03c58e24bf Refine IPv6 disable flow for local development 2026-03-31 23:33:14 +02:00
kevinveenbirkenbach 1770dd7f9f test(environment): clarify HTTP 000 expectation 2026-03-30 22:31:38 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 9c1e62fd50 fix(tests): expect HTTP 000 when subdomain is missing from certificate SAN
curl returns 000 (no HTTP response) instead of 404 when the TLS handshake
fails because the target subdomain is not listed as a SAN in the deployed
certificate. Updated both assertions and added explanatory comments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 22:29:47 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 10b889e76f refactor(deploy): single deploy-fresh-purged-apps target with FULL_CYCLE flag
Consolidates into one target. FULL_CYCLE defaults to false (deploy only);
set FULL_CYCLE=true for deploy + update pass. Extracts run_pass function
in fresh-purged-app.sh to eliminate duplicated init+deploy logic. Updates
makefile.md, playwright.md, iteration.md, and environment.sh with correct
FULL_CYCLE usage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 17:14:44 +02:00
kevinveenbirkenbach 18c0eeb679 Moved build block 2026-03-30 05:34:48 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 357943f056 feat(environment): add inspect function and HOST_VARS_FILE SPOT
Extract inventory/host_vars printing into an inspect() function called
after each deploy. Define HOST_VARS_FILE as a SPOT in inventory.sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 05:26:20 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 0475e76db5 refactor(environment): replace assert comments with echo statements
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 05:21:37 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 0a1dcc179c refactor(environment): replace make comments with echo statements
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 05:18:26 +02:00
kevinveenbirkenbach e142b42a3a fix(ci): install missing ruamel.yaml dependency in deploy pipeline 2026-03-30 04:27:31 +02:00
kevinveenbirkenbach 40375decb8 fix(env): force local runtime context by unsetting CI markers
Unset GITHUB_ACTIONS and ACT in environment.sh to prevent runtime.sh
from detecting a CI environment (GitHub Actions or act).

This ensures deterministic local execution even when the script is
run inside CI-like shells or inherited environments.
2026-03-30 03:24:35 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 1b690bcaab fix(environment): source env after install to prevent stale PYTHON cache
Move `source all.sh` to after `make install` so that INFINITO_ENV_PYTHON_LOADED
is not pre-exported into make's environment. This ensures each recipe subshell
re-evaluates PYTHON and picks up the venv interpreter once the venv exists.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 03:15:53 +02:00
kevinveenbirkenbach ea4c2d06c2 Removed uneccessary test 2026-03-30 03:01:56 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 0d206ae3c8 refactor(inventory): introduce INVENTORY_FILE as SPOT for devices.yml path
Define INVENTORY_FILE="${INVENTORY_DIR}/devices.yml" once in
scripts/meta/env/inventory.sh and export it. Remove all local
inv_file definitions; assert INVENTORY_FILE as required in each
consumer script. Rename CMD variable in container.sh from INSPECT_CMD.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 02:18:29 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 a50c90c733 fix(deploy): resolve SERVICES_DISABLED service names to app IDs and verify inventory
- deploy.py: use find_provider_roles() to map service names (e.g. 'matomo')
  to provider app IDs (e.g. 'web-app-matomo') before filtering deploy_ids;
  forward SERVICES_DISABLED into the container via extra_env
- container.sh: rename INSPECT_CMD to CMD for consistency; fix indentation
- Makefile: expose CMD variable on exec target for non-interactive use
- environment.sh: source scripts/meta/env/all.sh for INVENTORY_DIR; add
  inventory verification after SERVICES_DISABLED deploy using make exec
- variables.md: document CMD variable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 01:26:44 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 135ceefa98 fix(build): add SPOT for local image name and fix missing REPO_PREFIX
Add scripts/meta/resolve/image/local.sh as SPOT for the local Docker
image tag (<repo-basename>/<distro>). Wire it into Makefile build
targets (IMAGE_TAG), compose.py (_base_env sets INFINITO_IMAGE), and
compose.yml (no default fallback). Fix build.sh to accept a pre-set
IMAGE_TAG without requiring REPO_PREFIX. Add make build + build-no-cache
to environment.sh test flow with correct section ordering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 00:16:27 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 f3e4080188 fix(purge): remove GHCR cleanup, fix git clean, drop docker context prune
- Remove purge_images: GHCR cleanup is not a local system operation
- Remove sudo from git clean to avoid dubious ownership error in CI
- Remove docker context prune which fails with rc=125 in CI environments
- Update usage string to reflect removed GHCR step
- Add cancel-on-failure via API to test-environment, test-install-make,
  test-install-pkgmgr workflows; revert fail-fast to false so all matrix
  jobs complete before cancelling the run

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 18:03:46 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 e372349d10 refactor: rename deploy-*-app to deploy-*-apps for multi-app support
Update all Make targets, comments, docs, and scripts to use the plural
form, reflecting that APPS can specify more than one application.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 16:47:16 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 5357052dd5 feat(system): add system-disk-usage, rename purge-system to system-purge, remove purge-all
- Add scripts/system/meta/disk-usage.sh with best-effort coverage of
  Docker, Buildx, journald, pip, npm, yarn, Go, and distro package caches
- Add make system-disk-usage target
- Rename make purge-system -> system-purge for consistent naming
- Remove make purge-all (was a redundant alias)
- Remove scripts/system/purge/all.sh (logic consolidated into system-purge)
- Integrate scripts/image/cleanup.sh as best-effort step in system-purge
- Update environment.sh: run system-disk-usage before system-purge
- Update docs: hardware.md, makefile.md (add apparmor-teardown/restore entries)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 16:11:57 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 4002e83092 fix(purge): remove container-purge-system from purge-all
container-purge-system requires APPS to be set and is app-specific.
It does not belong in the system-wide purge-all flow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:45:51 +02:00
kevinveenbirkenbach 53b839a124 Optimized file format 2026-03-29 15:39:51 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 a132800a42 refactor(environment): restructure sections and add redeploy steps
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:32:20 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 5701c963c7 docs(environment): shorten purge-all comment to minimal-hardware rationale only
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:22:29 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 3cc1a5a137 refactor(environment): move package install into system section, update heading
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:21:38 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 00e74e8c73 docs(environment): split bootstrap into system and bootstrap section headers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:20:45 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 19beaa9cfd docs(environment): add testing and deploy section headers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:19:36 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 373c9a8f18 refactor(environment): move app selection rationale to configuration section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:18:04 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 cb90ac782b refactor(environment): move app/URL variables into configuration section at top
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:16:28 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 92123a7f3c docs(environment): add bootstrap section header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:15:38 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 b8c0cfe5a0 docs(environment): add teardown section header
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:14:50 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 9788cce248 docs(environment): clarify purge-all is primarily for minimal-hardware environments
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:14:03 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 7a4f5d6d39 docs(environment): add section headers separating script utilities from deploy steps
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:12:00 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 746554d6c1 refactor(environment): extract app names into DASHBOARD_APP and MATOMO_APP variables
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:09:11 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 903713a055 test(environment): assert dashboard unreachable after matomo-only fresh deploy
deploy-fresh-purged-app purges the previous inventory/containers, so the dashboard
deployed in the first step is gone after the matomo deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:07:55 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 f260e50c52 fix(environment): re-run trust-ca after second deploy-fresh-purged-app
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:06:31 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 74edf694bd refactor(environment): remove assert_http_status_not, expect 404 for disabled matomo
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:02:53 +02:00
kevinveenbirkenbachandClaude Sonnet 4.6 9d863f1ef4 feat(inventory): add SERVICES_DISABLED env var support and environment test flow
- Add services_disabler.py: parse SERVICES_DISABLED, disable services in host_vars,
  remove provider roles from inventory
- Wire apply_services_disabled_from_env into cli/create/inventory/cli.py after deploy
- Add unit tests for all services_disabler functions
- Update hardware.md and variables.md with SERVICES_DISABLED documentation
- Update environment.sh: deploy dashboard with SERVICES_DISABLED=matomo first,
  assert dashboard reachable + matomo not reachable, then deploy matomo and assert
  reachable; extract assert_http_status / assert_http_status_not helpers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 15:00:24 +02:00