Commit Graph
396 Commits
Author SHA1 Message Date
kevinveenbirkenbach 12704e9fa3 refactor(test-act): extract act deploy logic into dedicated scripts
- Move test-act target logic into scripts/tests/deploy/act/all.sh
- Move test-act-app target logic into scripts/tests/deploy/act/app.sh
- Keep Makefile targets as thin delegators
- Preserve existing flags and behavior

This keeps the Makefile minimal and makes act workflows reusable.

https://chatgpt.com/share/696ff4de-3abc-800f-a206-2f3dd5dec170
2026-01-20 22:34:14 +01:00
kevinveenbirkenbach adfc5123fc refactor(test-local): extract cleanup and rapid deploy into dedicated scripts
- Move test-local-cleanup logic into scripts/tests/deploy/local/cleanup.sh
- Move test-local-rapid logic into scripts/tests/deploy/local/rapid.sh
- Simplify Makefile targets to delegate into scripts
- Keep behavior and flags fully backward compatible

This improves maintainability, reuse in CI, and keeps the Makefile thin.
2026-01-20 22:32:00 +01:00
kevinveenbirkenbach 015d798c3b Removed wrong docker-up call 2026-01-20 21:59:04 +01:00
kevinveenbirkenbach 3fdd68932c Replaced docker by installatioon logic 2026-01-20 21:33:12 +01:00
kevinveenbirkenbach 3f72581c9d Optimized dir for github actions 2026-01-20 21:28:47 +01:00
kevinveenbirkenbach d35e932e0c refactor(cli): switch development CLI to dynamic dispatcher and fix test paths
- Replace static argparse-based CLI in cli.deploy.development with dynamic
  module dispatcher compatible with nested command discovery.
- Ensure cli.deploy.development is executable via python -m and root dispatcher.
- Fix unit test path resolution to work locally and in CI.
- Make docker-* Makefile targets depend on install.
- Simplify test runner script and keep Nix flake config compatibility.

This aligns the CLI architecture with integration test discovery
(cli/**/__main__.py) and removes the need for manual subcommand registration.

https://chatgpt.com/share/696fdbbc-b6d8-800f-a8b5-067aa7e38706
2026-01-20 20:46:20 +01:00
kevinveenbirkenbach 4e0d09e773 refactor(dev-orchestrator): centralize image build and add up --when-down SPOT
- Introduce cli.deploy.development build subcommand as single build SPOT
- Remove legacy compose.build_infinito implementation
- Make up use build-missing logic via build handler
- Add --when-down flag to up (skip startup if stack already running)
- Simplify restart/run to reuse up handler
- Ensure tests use up --when-down to avoid stack interference
- Make test targets depend on build-missing

https://chatgpt.com/share/696fd3c9-99f0-800f-a0ab-33a91058419a
2026-01-20 20:13:02 +01:00
kevinveenbirkenbach 1b07554914 Removed build missing flag for tests 2026-01-20 18:30:25 +01:00
kevinveenbirkenbach 41829df6e0 ci: build CI images first and use per-commit image tags in tests
- Run build-ci-images before all code test jobs
- Propagate ci-${GITHUB_SHA} image tag into test workflows
- Remove forced INFINITO_PULL_POLICY=never from Makefile tests
- Ensure tests use the freshly built CI images instead of :latest

https://chatgpt.com/share/696fb8cc-6b24-800f-8c96-d840f68d8eaa
2026-01-20 18:17:50 +01:00
kevinveenbirkenbach e23ffdc2aa feat(nix): make flake config non-interactive via nix.conf and simplify NIX_CONFIG handling
Enable accept-flake-config globally in the image to avoid interactive prompts.
Remove automatic NIX_CONFIG injection from Makefile and only export it when explicitly set.

https://chatgpt.com/share/696fb4fc-8cf0-800f-af72-f5d6428be14c
2026-01-20 18:01:23 +01:00
kevinveenbirkenbach b18509d18a Removed up dependency 2026-01-20 17:28:49 +01:00
kevinveenbirkenbach bbea43f669 refactor(ci,tests): migrate discovery and local deploy to development compose stack
- Replace legacy ci scripts with meta build-test-matrix and resolve-invokable-roles
- Switch log tailing to scripts/meta/log-tail.sh
- Rename local DNS helpers to scripts/dns/*
- Run ci-deploy-discover via development docker-up
- Replace deploy-local-full with development compose orchestrator
- Ensure INFINITO_DISTRO is passed explicitly for local full deploy

https://chatgpt.com/share/696f9ccd-e4d8-800f-9c67-9c071188ecd0
https://chatgpt.com/share/696facf5-b2fc-800f-8a33-3352dd193c54
2026-01-20 17:27:09 +01:00
kevinveenbirkenbach f52a012829 feat(cli): replace test deploy runner with development CLI (up/down/stop/restart/run)
https://chatgpt.com/share/696f9ccd-e4d8-800f-9c67-9c071188ecd0
2026-01-20 16:18:31 +01:00
kevinveenbirkenbach fda49ca30e fix(ci,nix): make flake config non-interactive and add safe pkgmgr debug
- Stop baking NIX_CONFIG into Docker image layers
- Build effective NIX_CONFIG via Makefile using real multiline config
- Always allow flake-provided nixConfig non-interactively
- Add sanitized rescue/debug block for pkgmgr update (no credential leaks)
- Improve CI diagnostics for GitHub token / nix access issues

https://chatgpt.com/share/696f8687-4444-800f-ab86-021bcb35a7a6
2026-01-20 14:43:09 +01:00
kevinveenbirkenbach aaf9667154 Removed legacy code 2026-01-20 13:02:02 +01:00
kevinveenbirkenbach 3093213a84 ci: mount Docker data-root via env-configured volume on GitHub runner
- Add INFINITO_DOCKER_VOLUME and INFINITO_DOCKER_MOUNT env wiring in Makefile
- Switch infinito service to mount Docker root via env (with local fallback volume)
- Disable docker-on-mnt helper in favor of compose-based mount
- Keep named volume as fallback for local deployments

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 12:24:11 +01:00
kevinveenbirkenbach e10a000291 fix(ci,postgres): stabilize GitHub runner env, move docker to /mnt, add deep debug for role login
- Introduce deterministic RUNNING_ON_GITHUB / RUNNING_ON_ACT detection
- Move Docker data-root to /mnt on real GitHub runners only
- Switch POSTGRES_PASSWORD schema from bcrypt to alphanumeric (avoid $ interpolation)
- Add robust rescue/debug block for ALTER ROLE login step
  (docker inspect, logs, pg_isready, psql auth, hba, activity, roles)
- Make docker-on-mnt deterministic (no migration, root-dir assertion)

Fixes flaky CI runs and intermittent PostgreSQL authentication failures.

https://chatgpt.com/share/696f4386-fbbc-800f-bdde-f1e6c4145c84
2026-01-20 09:57:32 +01:00
kevinveenbirkenbach cb7b878c85 feat(ci): move Docker data-root to /mnt on GitHub runners and raise CI storage threshold
https://chatgpt.com/share/696eeb85-9d78-800f-9844-bfdebe07a0fa
2026-01-20 03:41:55 +01:00
kevinveenbirkenbach d8c50973bd ci: make discover.sh self-contained by resolving repo root internally
Move repo root detection into scripts/ci/discover.sh so it can be executed
from any working directory. Simplify ci-discover-output to just call the
script and rely on its internal path resolution.

https://chatgpt.com/share/696e3d20-276c-800f-87a7-a7052989ffe4
2026-01-19 17:45:38 +01:00
kevinveenbirkenbach 00a1e4c99c ci: ensure discover runs from git repo root
Change ci-discover-output to resolve the repository root via git and execute
scripts/ci/discover.sh from there so that relative paths (e.g. roles/* and
scripts/tests/*) resolve correctly.

This fixes empty discovery results and "Role directory not found" warnings
caused by running discovery from the wrong working directory.

https://chatgpt.com/share/696e3d20-276c-800f-87a7-a7052989ffe4
2026-01-19 17:23:10 +01:00
kevinveenbirkenbach d2420ab49c ci: run discovery on host and move storage filter into infinito container
Restore discover.sh execution on the host to avoid running Docker Compose
from inside the container, and execute only the storage validation logic
inside the infinito CI container.

This fixes "--profile" errors caused by compose-in-compose and keeps the
Python dependency stack isolated inside the container.

- Run scripts/ci/discover.sh directly on host
- Execute sufficient_storage filter via docker compose exec
- Keep CI output and ONLY_APP override unchanged

https://chatgpt.com/share/696e3d20-276c-800f-87a7-a7052989ffe4
2026-01-19 17:02:52 +01:00
kevinveenbirkenbach 52239062e4 ci: execute discover.sh from repo root resolved via pkgmgr
Ensure ci-discover-output changes into the Infinito repository root (resolved
inside the container via `pkgmgr path infinito`) before executing
scripts/ci/discover.sh so that all relative paths (e.g. scripts/tests/discover-apps.sh)
resolve correctly.

This makes discovery robust against different working directories and future
layout changes.

https://chatgpt.com/share/696e3d20-276c-800f-87a7-a7052989ffe4
2026-01-19 16:18:00 +01:00
kevinveenbirkenbach e8fb081ced ci: resolve discover.sh path via pkgmgr inside infinito container
Update ci-discover-output Make target to dynamically resolve the Infinito
repository path inside the CI container using `pkgmgr path infinito` instead
of relying on a fixed working directory.

This makes app discovery robust against future repo layout changes and
ensures discover.sh is always executed from the correct location.

- Resolve repo root via pkgmgr inside container
- Execute scripts/ci/discover.sh from resolved path
- Keep ONLY_APP override and GITHUB_OUTPUT handling intact

https://chatgpt.com/share/696e3d20-276c-800f-87a7-a7052989ffe4
2026-01-19 15:45:57 +01:00
kevinveenbirkenbach f6005c9daa ci: wrap app discovery into Make target and run inside infinito container
Move the full app discovery step into a dedicated Make target (ci-discover-output)
and execute discover.sh inside the infinito CI container to ensure a consistent
runtime environment.

This removes inline discovery logic from GitHub Actions workflows and prevents
host-side dependency issues (e.g. missing Python modules or jq mismatches).

- Add ci-discover-output Make target
- Run scripts/ci/discover.sh inside infinito container
- Simplify all test-deploy workflows to use the new wrapper
- Keep ONLY_APP override and GITHUB_OUTPUT handling intact

https://chatgpt.com/share/696e3d20-276c-800f-87a7-a7052989ffe4
2026-01-19 15:17:38 +01:00
kevinveenbirkenbach 98e5a46525 test: add local cleanup target with automatic entity purge from app id
- Add test-local-cleanup target that derives entity name from APP using entity_name_utils
- Automatically purge matching /opt/docker/<entity> stack before rapid deploy
- Skip purge gracefully if entity cannot be resolved or stack directory is missing
- Add test-local-rapid-fresh target to run cleanup before rapid deploy

https://chatgpt.com/share/696e37cb-17b4-800f-b6f3-2becd2f61814
2026-01-19 14:55:15 +01:00
kevinveenbirkenbach af2cebabec Reduced noisiness 2026-01-18 19:47:49 +01:00
kevinveenbirkenbach 8b0e167b36 make: forward Ctrl+C into container during test-local-rapid
Use `docker exec -it` and `exec infinito ...` so SIGINT (Ctrl+C) is properly
forwarded to the running deploy process inside the container.

https://chatgpt.com/share/696d0cf9-66f4-800f-998a-b3871d035a27
2026-01-18 17:40:15 +01:00
kevinveenbirkenbach 149c044e4f Removed logging - Outer commands take care of it 2026-01-18 09:05:20 +01:00
kevinveenbirkenbach 95e3823d2f refactor: centralize token store init and allow Mailu 301 status checks
- move sys-token-store initialization to constructor stage
- remove duplicate token store includes from frontend and app roles
- allow Mailu reachability check to accept configurable status codes (200, 301)
- make Mailu health check consistent with web-app-mailu config
- increase test-local-rapid verbosity for better diagnostics

https://chatgpt.com/share/696c0f49-7888-800f-8175-fb21893c0d67
2026-01-17 23:37:54 +01:00
kevinveenbirkenbach fa422ed7fe cli: allow comma-separated application IDs for --id flag
- Support space-separated, comma-separated and mixed --id values
- Normalize and deduplicate application IDs before validation
- Fix Makefile to pass APP without quoting
- Add unittest coverage for ID normalization

https://chatgpt.com/share/696be0c2-816c-800f-8b07-3c5cd0304ac5
2026-01-17 20:19:13 +01:00
kevinveenbirkenbach 89cc377d38 refactor(rdbms): fix recursive variable resolution by introducing database_consumer_id
- Replace database_application_id with database_consumer_id
- Use explicit consumer context for database resolution
- Fix recursive Jinja variable loop in sys-svc-rdbms
- Decouple discourse database network from global database_type

https://chatgpt.com/share/696bd40d-ebfc-800f-9ba8-1e6be919a629
2026-01-17 19:25:12 +01:00
kevinveenbirkenbach 1ce504020a Fixed falsy comamnd call 2026-01-17 18:09:59 +01:00
kevinveenbirkenbach 3a7508fbf1 ci: rename make up/down targets to docker-up/docker-down in workflows and Makefile
Replaced all usages of `make up` with `make docker-up` in GitHub Actions workflows.
Renamed Makefile targets:
- up      -> docker-up
- down    -> docker-down
- stop    -> docker-stop
- added docker-restart

This makes the Docker-specific intent explicit and avoids ambiguity with other potential `up` targets.

https://chatgpt.com/share/696bb966-ee90-800f-a5d2-e419cc423cc4
2026-01-17 17:31:25 +01:00
kevinveenbirkenbach 3e8556b34c sys-service: normalize flush logic, set default state for local tests, fix LAM CSP flags
- Set SYS_SERVICE_DEFAULT_STATE=started for local rapid tests
- Remove deprecated SYS_SERVICE_SUPPRESS_FLUSH mechanism
- Simplify service flush/suppress logic
- Normalize formatting and ensure newline in database vars
- Adjust LAM CSP flags (disable unsafe-inline for script-src-elem)
2026-01-17 14:31:19 +01:00
kevinveenbirkenbach 28ddbaa270 ci(dns): fix AAAA handling in CoreDNS and add robust DinD DNS health check
- Replace NXDOMAIN for AAAA with fallthrough to avoid SERVFAIL and Node EAI_AGAIN
- Add robust Docker-in-Docker DNS health check (A + no SERVFAIL)
- Add Node/getaddrinfo DNS validation (matches CSP checker behavior)
- Add make target to stop CI compose stack without removing volumes

This prevents DNS resolver failures inside DinD and makes CSP health checks reliable.

https://chatgpt.com/share/696aba87-e5d4-800f-871c-aac049201fb7
2026-01-16 23:24:03 +01:00
kevinveenbirkenbach 505af3e2ad cli: make --log require explicit directory and create parents automatically
- Change --log flag to require explicit log directory (--log <LOG_DIR>)
- Automatically create log directory with parents=True
- Harden permissions best-effort (0700)
- Update CLI help text accordingly
- Adjust Makefile test targets to pass explicit log directory
- Ignore logs/ via .gitignore and .dockerignore
- Refactor flag parsing to correctly detect deploy with --log
- Add dedicated logging unit tests
- Update existing tests for new log semantics
- Remove deprecated -i alias for --id in deploy command

https://chatgpt.com/share/6969680a-dbf8-800f-aafb-3d32d6212ba0
2026-01-15 23:19:31 +01:00
kevinveenbirkenbach bcc638fe0a dev(local): add full local deploy helper and rename act/rapid targets
- Rename act-based targets for clarity:
  - test-deploy -> test-act
  - test-deploy-app -> test-act-app
- Rename rapid local deploy target:
  - test-deploy-rapid -> test-local-rapid
- Add test-local-full target to run a full local deploy against a generated
  inventory containing all apps of the selected TEST_DEPLOY_TYPE
- Add scripts/tests/deploy-local-full.sh:
  - Discover apps on host via make ci-deploy-discover
  - Bootstrap container via scripts/docker/entry.sh
  - Generate dedicated inventory with --include list
  - Deploy against that inventory

https://chatgpt.com/share/69692ef1-095c-800f-83cb-924fadfaa554
2026-01-15 20:05:08 +01:00
kevinveenbirkenbach 865068ef43 dev(local): add rapid deploy target with entry.sh bootstrap
- Add test-deploy-rapid Makefile target for fast local single-app deploys
- Execute scripts/docker/entry.sh before running infinito deploy
- Run deploy inside existing infinito container (no rebuild, no update)
- Skip update and backup for faster inner-loop testing

https://chatgpt.com/share/69692ef1-095c-800f-83cb-924fadfaa554
2026-01-15 19:44:05 +01:00
kevinveenbirkenbach 54d8997a1b ci(local): add serial test-deploy-local workflow and wire Makefile targets
- Add new test-deploy-local.yml workflow for local act runs
  - Uses env-based configuration (TEST_DEPLOY_TYPE, DISTROS, ONLY_APP)
  - Enforces serial execution via strategy.max-parallel: 1
  - Supports optional workflow_dispatch inputs for GitHub UI

- Refactor Makefile deploy targets
  - Move distro variables to top-level section
  - Add local act-based deploy flow using test-deploy-local.yml
  - Keep CI deploy flow via workflow_dispatch event payload
  - Remove deprecated rapid deploy path

This enables reliable, non-parallel local deploy testing with act
while keeping CI deploy workflows unchanged.

https://chatgpt.com/share/69692ef1-095c-800f-83cb-924fadfaa554
2026-01-15 19:16:05 +01:00
kevinveenbirkenbach bab0bceb1d feat(local-dns): add dnsmasq-based infinito.example wildcard + set CI primary domain
https://chatgpt.com/share/6969261a-8d34-800f-9a61-725e90544dea
2026-01-15 18:38:15 +01:00
kevinveenbirkenbach 6c04c09fb4 fix(ci): remove trailing whitespace from INFINITO_IMAGE to avoid invalid Docker image reference
The Makefile defined INFINITO_IMAGE with trailing tabs/spaces, which caused
Docker to fail with "invalid reference format" during CI pulls/builds.
This change removes the trailing whitespace so the image reference is valid.

https://chatgpt.com/share/69683f7d-faa0-800f-bb55-c40a4e9b7737
2026-01-15 02:14:15 +01:00
kevinveenbirkenbach a323f2199d optimized code tests 2026-01-15 02:07:31 +01:00
kevinveenbirkenbach 8ea56548d1 Optimized INFINITO_BUILD_LOCAL 2026-01-15 01:53:32 +01:00
kevinveenbirkenbach 97642e949c ci(release): switch to immutable ci-<sha> image tags and retag on release
- Build CI images with immutable ci-<sha> tags instead of latest
- Pass CI image tag into deploy workflows via INFINITO_IMAGE_TAG
- Derive CI_TAG from checked-out release tag commit
- Retag CI images to <version> and latest on release (no rebuild)
- Make release scripts independent from GITHUB_SHA coupling
- Improve robustness and reproducibility of release pipeline

https://chatgpt.com/share/696832f6-35e4-800f-a574-178013d4426e
2026-01-15 01:20:39 +01:00
kevinveenbirkenbach 334c4b70c7 fix: stabilize rapid deploy env, improve entry.sh debugging and harden contact config
- Fix Makefile rapid deploy target to properly export INFINITO_DISTRO
- Capture stdout/stderr from entry.sh init and raise explicit error on failure
- Add fallback contact addresses for demo environments (email, matrix, mastodon, etc.)
- Quote mailto URLs and identifiers to ensure valid YAML output
- Replace placeholder legal contact with demo user

This prevents YAML parser errors (e.g. `url: mailto:`), improves CI diagnostics,
and ensures desktop contact menu is always rendered with valid defaults.

https://chatgpt.com/share/69679c78-f338-800f-be86-54b3195d19b7
2026-01-14 14:38:42 +01:00
kevinveenbirkenbach 3f667aadda ci: switch CI images to latest tag and skip compose build in deploy
- Build CI images workflow now always publishes :latest instead of ci-<sha>
- Removed obsolete tag input and CI tag computation logic
- Deploy in real GitHub Actions now pulls ghcr.io/.../infinito-<distro>:latest
- Skip docker compose build when INFINITO_NO_BUILD=1
- Respect INFINITO_IMAGE for --missing image existence check

This ensures deploy jobs use the already published production image and never rebuild in CI.

https://chatgpt.com/share/69678e2c-7d7c-800f-b422-15e98c8e4b6e
2026-01-14 13:37:54 +01:00
kevinveenbirkenbach 7a2b1dcedd Reverted condition for ebtter readability 2026-01-14 13:20:25 +01:00
kevinveenbirkenbach 4a008d8b97 ci: centralize INSTALL_LOCAL_BUILD handling across Makefile, compose and runner
- Control INSTALL_LOCAL_BUILD centrally via Makefile depending on CI context:
  - real GitHub Actions runner: disable local rebuild
  - act and local runs: enable local rebuild
- Pass INSTALL_LOCAL_BUILD through docker-compose using environment expansion
- Remove hardcoded INSTALL_LOCAL_BUILD=1 from CI container runner
- Keep Dockerfile local-build during image build for CI images

This ensures consistent local/CI behavior and avoids unnecessary rebuilds on real CI runners.

https://chatgpt.com/share/6967876f-e400-800f-90ec-fe870e565bf3
2026-01-14 13:09:13 +01:00
kevinveenbirkenbach 0cad360d29 ci: refactor deploy workflows and make CI build behaviour explicit
- Replace legacy MODE env with TEST_DEPLOY_TYPE across workflows and scripts
- Route CI deploy and discovery through Makefile targets
- Rename deploy-one-app.sh to deploy-app.sh and update all call sites
- Fix Makefile recursion and ensure scripts are executed directly
- Ensure JSON discovery output is clean via silent make target
- Make MISSING_ONLY default true via Makefile
- Respect INFINITO_NO_BUILD in compose up to avoid implicit rebuilds in CI
- Keep explicit build step before compose up for deterministic CI runs
- Improve deploy logging (test_deploy_type instead of mode)

Result:
- Deterministic CI behaviour
- No accidental docker compose rebuilds on up
- Single source of truth for deploy orchestration
- Cleaner env contract between workflows, make, bash and python

https://chatgpt.com/share/69678024-fe38-800f-b877-add46aa55190
2026-01-14 12:37:41 +01:00
kevinveenbirkenbach 517ccf44c0 ci: replace rest deploy mode with universal and add universal stage
- Rename CI workflow and MODE from "rest" to "universal"
- Extend CLI and test runner to support universal deploy type
- Add tasks/stages/02_universal.yml for universal host type
- Update discover logic to use universal app selection
- Remove legacy rest->server mapping and obsolete select helper

https://chatgpt.com/share/6967625e-81c8-800f-8592-5d5b8edec1e2
2026-01-14 10:31:06 +01:00