diff --git a/.github/workflows/ci-orchestrator.yml b/.github/workflows/ci-orchestrator.yml index 5c63f424c3..1a7c244d19 100644 --- a/.github/workflows/ci-orchestrator.yml +++ b/.github/workflows/ci-orchestrator.yml @@ -199,24 +199,6 @@ jobs: distros: ${{ inputs.distros }} whitelist: ${{ inputs.whitelist }} - test-deploy-universal: - needs: - - test-dns - - images-mirror-missing - uses: ./.github/workflows/test-deploy-universal.yml - with: - distros: ${{ inputs.distros }} - whitelist: ${{ inputs.whitelist }} - - test-deploy-workstation: - needs: - - code-quality-gate - - build-ci-images - uses: ./.github/workflows/test-deploy-workstation.yml - with: - distros: ${{ inputs.distros }} - whitelist: ${{ inputs.whitelist }} - test-deploy-swarm: needs: - code-quality-gate @@ -255,8 +237,6 @@ jobs: name: ๐Ÿ Finish pipeline needs: - test-deploy-compose - - test-deploy-universal - - test-deploy-workstation - test-deploy-swarm - test-install-gate - test-development diff --git a/.github/workflows/test-deploy-compose.yml b/.github/workflows/test-deploy-compose.yml index 12acdc7c3e..7e7055c5dc 100644 --- a/.github/workflows/test-deploy-compose.yml +++ b/.github/workflows/test-deploy-compose.yml @@ -18,7 +18,6 @@ permissions: packages: read env: - INFINITO_DEPLOY_TYPE: server INFINITO_DISTROS: ${{ inputs.distros }} NIX_CONFIG: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-deploy-local.yml b/.github/workflows/test-deploy-local.yml deleted file mode 100644 index b3578ce338..0000000000 --- a/.github/workflows/test-deploy-local.yml +++ /dev/null @@ -1,143 +0,0 @@ -name: "๐Ÿ“ฆ Test: Deploy (local)" - -on: - workflow_dispatch: - inputs: - test_deploy_type: - description: "server | universal | workstation" - required: false - default: "server" - type: string - distros: - description: "Space-separated distro list" - required: false - default: "debian" - type: string - whitelist: - description: "Optional space-separated whitelist of app ids" - required: false - type: string - default: "" - -permissions: - contents: read - packages: read - -# IMPORTANT: -# - For local `act`, prefer overriding via `--env`. -# - For GitHub UI dispatch, inputs are used as fallback. -env: - INFINITO_DEPLOY_TYPE: "server" - INFINITO_DISTROS: "debian" - NIX_CONFIG: "" - INFINITO_IMAGE_TAG: "latest" - INFINITO_PLAYWRIGHT_KEEP: ${{ vars.INFINITO_PLAYWRIGHT_KEEP }} - INFINITO_APP_DISCOVERY_RUNNER: host - -jobs: - discover: - name: ๐Ÿ”Ž Discover apps (local) - runs-on: ubuntu-latest - timeout-minutes: 60 - outputs: - apps: ${{ steps.discover.outputs.apps }} - test_deploy_type: ${{ steps.vars.outputs.test_deploy_type }} - distros: ${{ steps.vars.outputs.distros }} - whitelist: ${{ steps.vars.outputs.whitelist }} - - steps: - - uses: actions/checkout@v7 - - - name: Resolve effective inputs/env - id: vars - shell: bash - env: - INPUT_TEST_DEPLOY_TYPE: ${{ inputs.test_deploy_type }} - INPUT_DISTROS: ${{ inputs.distros }} - INPUT_WHITELIST: ${{ inputs.whitelist }} - run: | - set -euo pipefail - scripts/meta/resolve/input.sh - - - name: Install deps (jq + envsubst) - shell: bash - run: ./scripts/install/apt.sh jq gettext-base - - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: "3.12" - cache: pip - cache-dependency-path: pyproject.toml - - - name: Install project (host venv) - shell: bash - run: make install - - - name: Discover apps - id: discover - shell: bash - env: - INFINITO_WHITELIST: ${{ inputs.whitelist }} - run: ./scripts/github/resolve/output_apps.sh - - deploy: - name: ๐Ÿš€ Deploy ${{ needs.discover.outputs.test_deploy_type }} app (${{ matrix.apps }}) - if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]' - runs-on: ubuntu-latest - timeout-minutes: 360 - needs: discover - - strategy: - fail-fast: false - max-parallel: 1 # immer linear - matrix: - apps: ${{ fromJson(needs.discover.outputs.apps) }} - - steps: - # Reclaim runner space before Docker pulls start. Deploy jobs otherwise - # compete with the default Ubuntu image payload for limited root space. - # Option rationale: docs/contributing/artefact/files/github/workflow.md - - name: ๐Ÿงน Free disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - - if: ${{ !env.ACT }} - uses: actions/checkout@v7 - - # Replace the default ~4 GB runner swap with a larger file so transient - # memory spikes (e.g. peertube plugin install, issue #162) don't trip - # the host OOM-killer. Script picks / or /mnt based on live free space. - - name: ๐Ÿ’พ Enlarge swap space - shell: bash - run: ./scripts/github/runner/enlarge_swap.sh - - - name: Install deps (jq + envsubst) - shell: bash - run: ./scripts/install/apt.sh jq gettext-base - - - name: ๐Ÿš€ Deploy app (same as CI logic) - shell: bash - env: - INFINITO_DEPLOY_TYPE: ${{ needs.discover.outputs.test_deploy_type }} - INFINITO_DISTROS: ${{ needs.discover.outputs.distros }} - apps: ${{ matrix.apps }} - ANSIBLE_LOG_PATH: /tmp/ansible-${{ matrix.apps }}.log - run: ./scripts/tests/deploy/ci/all.sh - - - name: ๐Ÿ“Š Role runtimes - if: always() - shell: bash - run: python3 utils/github/profile/role_summary.py /tmp/ansible-${{ matrix.apps }}.log - - - name: ๐Ÿฉบ Dump runner state (on failure) - if: failure() - shell: bash - run: ./scripts/github/runner/dump_state.sh "post-deploy failure (${{ matrix.apps }})" diff --git a/.github/workflows/test-deploy-swarm.yml b/.github/workflows/test-deploy-swarm.yml index abff30c640..1cd921f7a6 100644 --- a/.github/workflows/test-deploy-swarm.yml +++ b/.github/workflows/test-deploy-swarm.yml @@ -21,7 +21,6 @@ permissions: packages: read env: - INFINITO_DEPLOY_TYPE: server NIX_CONFIG: | access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} INFINITO_IMAGE_TAG: ci-${{ github.sha }} diff --git a/.github/workflows/test-deploy-universal.yml b/.github/workflows/test-deploy-universal.yml deleted file mode 100644 index 9a4fb41d07..0000000000 --- a/.github/workflows/test-deploy-universal.yml +++ /dev/null @@ -1,138 +0,0 @@ -name: "๐Ÿ“ฆ Test: Deploy (universal)" - -on: - workflow_call: - inputs: - distros: - description: "Space-separated distro list" - required: true - type: string - whitelist: - description: "Optional space-separated whitelist of app ids" - required: false - type: string - default: "" - -permissions: - contents: read - packages: read - -env: - INFINITO_DEPLOY_TYPE: universal - INFINITO_DISTROS: ${{ inputs.distros }} - NIX_CONFIG: | - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - INFINITO_IMAGE_TAG: ci-${{ github.sha }} - INFINITO_GHCR_MIRROR_PREFIX: mirror - INFINITO_PLAYWRIGHT_KEEP: ${{ vars.INFINITO_PLAYWRIGHT_KEEP }} - INFINITO_APP_DISCOVERY_RUNNER: host -jobs: - discover: - name: โœจ Discover apps - runs-on: ubuntu-latest - timeout-minutes: 60 - outputs: - apps: ${{ steps.discover.outputs.apps }} - - steps: - - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - - name: ๐Ÿ” Resolve repository owner - shell: bash - run: | - set -euo pipefail - echo "GITHUB_REPOSITORY_OWNER=$(scripts/meta/resolve/repository/owner.sh)" >> "$GITHUB_ENV" - - - name: ๐Ÿ“ฆ Install jq - shell: bash - run: ./scripts/install/apt.sh jq - - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: "3.12" - cache: pip - cache-dependency-path: pyproject.toml - - - name: Install project (host venv) - shell: bash - run: make install - - - name: Resolve effective whitelist (diff vs origin/main) - id: resolve_wl - shell: bash - env: - INPUT_WHITELIST: ${{ inputs.whitelist }} - run: ./scripts/github/resolve/effective_whitelist.sh - - - name: Discover apps - id: discover - shell: bash - env: - INFINITO_WHITELIST: ${{ steps.resolve_wl.outputs.whitelist }} - run: ./scripts/github/resolve/output_apps.sh - - universal: - name: โœจ Universal ${{ matrix.apps }} - if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]' - runs-on: ubuntu-latest - timeout-minutes: 360 - needs: discover - - strategy: - fail-fast: false - matrix: - apps: ${{ fromJson(needs.discover.outputs.apps) }} - - steps: - # Reclaim runner space before Docker pulls start. Deploy jobs otherwise - # compete with the default Ubuntu image payload for limited root space. - # Option rationale: docs/contributing/artefact/files/github/workflow.md - - name: ๐Ÿงน Free disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - - uses: actions/checkout@v7 - - # Replace the default ~4 GB runner swap with a larger file so transient - # memory spikes (e.g. peertube plugin install, issue #162) don't trip - # the host OOM-killer. Script picks / or /mnt based on live free space. - - name: ๐Ÿ’พ Enlarge swap space - shell: bash - run: ./scripts/github/runner/enlarge_swap.sh - - - name: ๐Ÿ” Resolve repository owner - shell: bash - run: | - set -euo pipefail - echo "GITHUB_REPOSITORY_OWNER=$(scripts/meta/resolve/repository/owner.sh)" >> "$GITHUB_ENV" - - - name: ๐Ÿ“ฆ Install jq - shell: bash - run: ./scripts/install/apt.sh jq - - - name: ๐Ÿš€ Deploy app - shell: bash - env: - apps: ${{ matrix.apps }} - ANSIBLE_LOG_PATH: /tmp/ansible-${{ matrix.apps }}.log - run: ./scripts/tests/deploy/ci/all.sh - - - name: ๐Ÿ“Š Role runtimes - if: always() - shell: bash - run: python3 utils/github/profile/role_summary.py /tmp/ansible-${{ matrix.apps }}.log - - - name: ๐Ÿฉบ Dump runner state (on failure) - if: failure() - shell: bash - run: ./scripts/github/runner/dump_state.sh "post-deploy failure (${{ matrix.apps }})" diff --git a/.github/workflows/test-deploy-workstation.yml b/.github/workflows/test-deploy-workstation.yml deleted file mode 100644 index b1f40ebc2f..0000000000 --- a/.github/workflows/test-deploy-workstation.yml +++ /dev/null @@ -1,138 +0,0 @@ -name: "๐Ÿ“ฆ Test: Deploy (workstation)" - -on: - workflow_call: - inputs: - distros: - description: "Space-separated distro list" - required: true - type: string - whitelist: - description: "Optional space-separated whitelist of app ids" - required: false - type: string - default: "" - -permissions: - contents: read - packages: read - -env: - INFINITO_DEPLOY_TYPE: workstation - INFINITO_DISTROS: ${{ inputs.distros }} - NIX_CONFIG: | - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - INFINITO_IMAGE_TAG: ci-${{ github.sha }} - INFINITO_GHCR_MIRROR_PREFIX: mirror - INFINITO_PLAYWRIGHT_KEEP: ${{ vars.INFINITO_PLAYWRIGHT_KEEP }} - INFINITO_APP_DISCOVERY_RUNNER: host -jobs: - discover: - name: ๐Ÿ–ฅ๏ธ Discover apps - runs-on: ubuntu-latest - timeout-minutes: 60 - outputs: - apps: ${{ steps.discover.outputs.apps }} - - steps: - - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - - name: ๐Ÿ” Resolve repository owner - shell: bash - run: | - set -euo pipefail - echo "GITHUB_REPOSITORY_OWNER=$(scripts/meta/resolve/repository/owner.sh)" >> "$GITHUB_ENV" - - - name: ๐Ÿ“ฆ Install jq - shell: bash - run: ./scripts/install/apt.sh jq - - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: "3.12" - cache: pip - cache-dependency-path: pyproject.toml - - - name: Install project (host venv) - shell: bash - run: make install - - - name: Resolve effective whitelist (diff vs origin/main) - id: resolve_wl - shell: bash - env: - INPUT_WHITELIST: ${{ inputs.whitelist }} - run: ./scripts/github/resolve/effective_whitelist.sh - - - name: Discover apps - id: discover - shell: bash - env: - INFINITO_WHITELIST: ${{ steps.resolve_wl.outputs.whitelist }} - run: ./scripts/github/resolve/output_apps.sh - - workstation: - name: ๐Ÿ–ฅ๏ธ Desktop ${{ matrix.apps }} - if: needs.discover.outputs.apps != '' && needs.discover.outputs.apps != '[]' - runs-on: ubuntu-latest - timeout-minutes: 360 - needs: discover - - strategy: - fail-fast: false - matrix: - apps: ${{ fromJson(needs.discover.outputs.apps) }} - - steps: - # Reclaim runner space before Docker pulls start. Deploy jobs otherwise - # compete with the default Ubuntu image payload for limited root space. - # Option rationale: docs/contributing/artefact/files/github/workflow.md - - name: ๐Ÿงน Free disk space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - tool-cache: true - android: true - dotnet: true - haskell: true - large-packages: true - docker-images: true - swap-storage: true - - - uses: actions/checkout@v7 - - # Replace the default ~4 GB runner swap with a larger file so transient - # memory spikes (e.g. peertube plugin install, issue #162) don't trip - # the host OOM-killer. Script picks / or /mnt based on live free space. - - name: ๐Ÿ’พ Enlarge swap space - shell: bash - run: ./scripts/github/runner/enlarge_swap.sh - - - name: ๐Ÿ” Resolve repository owner - shell: bash - run: | - set -euo pipefail - echo "GITHUB_REPOSITORY_OWNER=$(scripts/meta/resolve/repository/owner.sh)" >> "$GITHUB_ENV" - - - name: ๐Ÿ“ฆ Install jq - shell: bash - run: ./scripts/install/apt.sh jq - - - name: ๐Ÿš€ Deploy app - shell: bash - env: - apps: ${{ matrix.apps }} - ANSIBLE_LOG_PATH: /tmp/ansible-${{ matrix.apps }}.log - run: ./scripts/tests/deploy/ci/all.sh - - - name: ๐Ÿ“Š Role runtimes - if: always() - shell: bash - run: python3 utils/github/profile/role_summary.py /tmp/ansible-${{ matrix.apps }}.log - - - name: ๐Ÿฉบ Dump runner state (on failure) - if: failure() - shell: bash - run: ./scripts/github/runner/dump_state.sh "post-deploy failure (${{ matrix.apps }})" diff --git a/Makefile b/Makefile index 497d7aa5e8..ae1a18bb5a 100644 --- a/Makefile +++ b/Makefile @@ -15,16 +15,6 @@ endif .DEFAULT_GOAL := help -.PHONY: act-all -# Run all act-based deploy checks. -act-all: - @bash scripts/tests/deploy/act/all.sh - -.PHONY: act-app -# Run the act-based app deploy check. -act-app: - @bash scripts/tests/deploy/act/app.sh - .PHONY: act-debug # Param: node= cmd='' act-debug: @@ -202,15 +192,13 @@ clean-sudo: # Param mode: initialize | reinstall | update (default: initialize) # Param apps: comma-separated app ids (e.g. web-app-matomo,web-app-keycloak) # Param purge: true | false (default: false) โ€” purge entities before deploy -# Param type: server | workstation | universal (default: from default.env) # Param bundles: comma-separated bundle names; overrides apps when set # Param disable: comma-separated service names to render as disabled # Param full_cycle: true | false โ€” when true, also run the async update pass # Param variant: matrix round index to pin the redeploy to a specific variant # Param debug: true | false (default: from default.env) compose-deploy: - @$(if $(type),INFINITO_DEPLOY_TYPE="$(type)") \ - $(if $(debug),INFINITO_DEBUG="$(debug)") \ + @$(if $(debug),INFINITO_DEBUG="$(debug)") \ bash scripts/tests/deploy/local/deploy/main.sh .PHONY: compose-down diff --git a/default.env b/default.env index da43179e30..78525b3a36 100644 --- a/default.env +++ b/default.env @@ -82,9 +82,6 @@ INFINITO_CPUS=0 # Truthy enables debug behavior in the local deploy flows. INFINITO_DEBUG=true -# Deployment matrix target: server | workstation | universal. -INFINITO_DEPLOY_TYPE=server - # Distro the build/test matrix is currently iterating over (generator may override). INFINITO_DISTRO=debian diff --git a/docs/agents/action/iteration/workflow.md b/docs/agents/action/iteration/workflow.md index 596e322658..d2f3fb0d97 100644 --- a/docs/agents/action/iteration/workflow.md +++ b/docs/agents/action/iteration/workflow.md @@ -13,7 +13,6 @@ For role-level and spec-level iteration, see [Role Loop](role.md) and [Playwrigh - When you constrain an Act matrix run through `ACT_MATRIX`, you MUST use Act's `key:value` syntax instead of `key=value`. Otherwise Act may ignore the filter and rerun the whole matrix. - For `.github/workflows/test-environment.yml`, the preferred focused Debian example is `make act-workflow ACT_WORKFLOW=.github/workflows/test-environment.yml ACT_JOB=test-environment ACT_MATRIX='dev_runtime_image:debian:bookworm'`. - You SHOULD avoid jumping straight to repeated remote CI reruns when `make act-workflow` can validate the workflow locally and the user agreed to use it. -- You MAY widen the scope to `make act-app` or `make act-all` when the problem spans more than one workflow or `make act-workflow` is too narrow for the failure. ## Inspect before redeploy diff --git a/docs/contributing/actions/testing/playwright.md b/docs/contributing/actions/testing/playwright.md index 3562d207e8..6ec4673a76 100644 --- a/docs/contributing/actions/testing/playwright.md +++ b/docs/contributing/actions/testing/playwright.md @@ -57,7 +57,7 @@ Any other value, including unset or empty, keeps artefacts only when a test fail The propagation chain has four hops: -1. The host environment variable `INFINITO_PLAYWRIGHT_KEEP` (set on the host shell, by `act --env INFINITO_PLAYWRIGHT_KEEP=true`, or by the GitHub Actions repository variable forwarded into each `test-deploy-*.yml` workflow as `INFINITO_PLAYWRIGHT_KEEP: ${{ vars.INFINITO_PLAYWRIGHT_KEEP }}`). +1. The host environment variable `INFINITO_PLAYWRIGHT_KEEP` (set on the host shell, by `act --env INFINITO_PLAYWRIGHT_KEEP=true`, or by the GitHub Actions repository variable forwarded into `test-deploy-compose.yml` as `INFINITO_PLAYWRIGHT_KEEP: ${{ vars.INFINITO_PLAYWRIGHT_KEEP }}`). 2. `roles/test-e2e-playwright/defaults/main.yml` reads the host value into `TEST_E2E_PLAYWRIGHT_KEEP` via `lookup('env', 'INFINITO_PLAYWRIGHT_KEEP')`. Inventory MAY override the role variable per environment in `group_vars` or `host_vars`. 3. `roles/test-e2e-playwright/tasks/02_run_one.yml` forwards the resolved value into the Playwright container as `-e INFINITO_PLAYWRIGHT_KEEP={{ TEST_E2E_PLAYWRIGHT_KEEP }}`. 4. `roles/test-e2e-playwright/files/playwright.config.js` switches `trace`, `screenshot`, and `video` to `on` when the container value is `true`. It otherwise leaves the failure-only defaults (`retain-on-failure` for trace and video, `only-on-failure` for screenshot). diff --git a/docs/contributing/artefact/git/pipeline.md b/docs/contributing/artefact/git/pipeline.md index cac06176a2..5ec182768a 100644 --- a/docs/contributing/artefact/git/pipeline.md +++ b/docs/contributing/artefact/git/pipeline.md @@ -64,11 +64,11 @@ GHCR publication uses the workflow `GITHUB_TOKEN`; optional Docker Hub secrets a ### 9. Deploy Tests ๐Ÿš€ -The three deploy-test workflows listed in the `Infrastructure tests` table of [workflows.md](../../tools/github/actions/workflows.md) (server, universal, workstation scopes) run in parallel once DNS and mirroring have completed. +The two deploy-test workflows listed in the `Infrastructure tests` table of [workflows.md](../../tools/github/actions/workflows.md) (compose and swarm modes) run in parallel once DNS and mirroring have completed. Both cover all deployment types (`INFINITO_DISCOVER_ALL`, lifecycle-filtered to `alpha beta rc stable`), not just the `web-*` server scope. #### Diff-driven app selection ๐ŸŽฏ -Each of [test-deploy-compose.yml](../../../../.github/workflows/test-deploy-compose.yml), [test-deploy-universal.yml](../../../../.github/workflows/test-deploy-universal.yml), and [test-deploy-workstation.yml](../../../../.github/workflows/test-deploy-workstation.yml) narrows its app matrix to the set of roles actually impacted by the branch's diff against `origin/main`. The `discover` job resolves an effective whitelist before [output_apps.sh](../../../../scripts/github/resolve/output_apps.sh) runs, using the following precedence: +Both [test-deploy-compose.yml](../../../../.github/workflows/test-deploy-compose.yml) and [test-deploy-swarm.yml](../../../../.github/workflows/test-deploy-swarm.yml) narrow their app matrix to the set of roles actually impacted by the branch's diff against `origin/main`. The `discover` job resolves an effective whitelist before [output_apps.sh](../../../../scripts/github/resolve/output_apps.sh) runs, using the following precedence: 1. **Sentinel `__ALL__` in the `whitelist` input** (case-insensitive). The diff logic MUST be skipped and an empty whitelist MUST be emitted, which deploys everything in the workflow's scope. This is the explicit opt-out from diff narrowing for manual dispatch. 2. **Any other non-empty `whitelist`** (forwarded from `entry-manual.yml` and similar). The explicit value MUST win over the diff and is passed through verbatim. @@ -80,7 +80,7 @@ The reverse closure is fail-safe: any seed that is not modellable in the resolve The PR-scope short-circuits in [scope.sh](../../../../scripts/meta/resolve/pr/scope.sh) (documentation-only, agent-only) still apply at the entry layer. They skip the orchestrator entirely and are independent of the diff-driven whitelist resolution above. -The reverse closure is implemented in [affected resolver](../../../../cli/meta/roles/applications/resolution/affected/__main__.py) and invoked from [affected_roles.sh](../../../../scripts/meta/resolve/diff/affected_roles.sh). The workflow glue lives in [effective_whitelist.sh](../../../../scripts/github/resolve/effective_whitelist.sh). [test-deploy-local.yml](../../../../.github/workflows/test-deploy-local.yml) MUST NOT apply this resolution. Local dispatch keeps the explicit whitelist semantics. +The reverse closure is implemented in [affected resolver](../../../../cli/meta/roles/applications/resolution/affected/__main__.py) and invoked from [affected_roles.sh](../../../../scripts/meta/resolve/diff/affected_roles.sh). The workflow glue lives in [effective_whitelist.sh](../../../../scripts/github/resolve/effective_whitelist.sh). ### 10. Installation Tests ๐Ÿ“ฆ diff --git a/docs/contributing/tools/github/actions/configuration.md b/docs/contributing/tools/github/actions/configuration.md index 25aff89482..8754297269 100644 --- a/docs/contributing/tools/github/actions/configuration.md +++ b/docs/contributing/tools/github/actions/configuration.md @@ -11,7 +11,7 @@ Repository variables are set under **Settings โ†’ Secrets and variables โ†’ Acti | `CI_CANCEL_IN_PROGRESS` | [entry-push-latest.yml](../../../../../.github/workflows/entry-push-latest.yml) | Cancels in-progress runs on new push | `false` to keep in-progress runs alive | | `CI_RUN_ON_MAIN` | [entry-push-latest.yml](../../../../../.github/workflows/entry-push-latest.yml) | Pushes to `main` skip CI | `true` to run CI on `main` pushes too | | `CI_ENABLE_AUTO_UPDATES` | [update.yml](../../../../../.github/workflows/update.yml), [dependabot-close.yml](../../../../../.github/workflows/dependabot-close.yml) | Update jobs skipped; Dependabot PRs auto-closed | `true` to allow update PRs (workflow-driven and Dependabot) | -| `INFINITO_PLAYWRIGHT_KEEP` | [test-deploy-compose.yml](../../../../../.github/workflows/test-deploy-compose.yml), [test-deploy-universal.yml](../../../../../.github/workflows/test-deploy-universal.yml), [test-deploy-workstation.yml](../../../../../.github/workflows/test-deploy-workstation.yml), [test-deploy-local.yml](../../../../../.github/workflows/test-deploy-local.yml) | Playwright keeps trace, screenshot and video only when a test fails | `true` to keep them for every test (passing runs included) | +| `INFINITO_PLAYWRIGHT_KEEP` | [test-deploy-compose.yml](../../../../../.github/workflows/test-deploy-compose.yml) | Playwright keeps trace, screenshot and video only when a test fails | `true` to keep them for every test (passing runs included) | ## `CI_CANCEL_IN_PROGRESS` ๐Ÿ›‘ @@ -116,7 +116,7 @@ Dependabot cannot read repository variables itself, so [dependabot-close.yml](.. ## `INFINITO_PLAYWRIGHT_KEEP` ๐ŸŽฌ -Controls whether Playwright keeps trace, screenshot, and video for every test or only for failing tests across the four deploy-test workflows ([test-deploy-compose.yml](../../../../../.github/workflows/test-deploy-compose.yml), [test-deploy-universal.yml](../../../../../.github/workflows/test-deploy-universal.yml), [test-deploy-workstation.yml](../../../../../.github/workflows/test-deploy-workstation.yml), [test-deploy-local.yml](../../../../../.github/workflows/test-deploy-local.yml)). +Controls whether Playwright keeps trace, screenshot, and video for every test or only for failing tests in the compose deploy-test workflow ([test-deploy-compose.yml](../../../../../.github/workflows/test-deploy-compose.yml)). For the full propagation chain, the inventory override, and the local equivalents, see [Playwright Tests](../../../actions/testing/playwright.md#artefact-retention-). **Default behaviour (variable not set or set to any value other than `true`):** diff --git a/docs/contributing/tools/github/actions/workflows.md b/docs/contributing/tools/github/actions/workflows.md index a77ca51611..11999baa9d 100644 --- a/docs/contributing/tools/github/actions/workflows.md +++ b/docs/contributing/tools/github/actions/workflows.md @@ -76,10 +76,8 @@ Trigger column legend: **auto** = fires automatically (push, pull_request, sched | Workflow | Description | Trigger | Inputs | |---|---|---|---| | [test-dns.yml](../../../../../.github/workflows/test-dns.yml): `๐Ÿ’ฌ Test: DNS` | Validates DNS resolution across target distributions. | reusable, manual | `distros` (required on call; default `debian` on manual) | -| [test-deploy-compose.yml](../../../../../.github/workflows/test-deploy-compose.yml): `๐Ÿ“ฆ Test: Deploy (compose)` | Deploy test for compose-mode server and `web-*` roles. When `whitelist` is empty, the discover job derives one from the branch's diff vs `origin/main`; see the "Diff-driven app selection" subsection in [pipeline.md](../../../artefact/git/pipeline.md). | reusable | `distros` (required), `whitelist` (optional; explicit value wins over diff) | -| [test-deploy-universal.yml](../../../../../.github/workflows/test-deploy-universal.yml): `๐Ÿ“ฆ Test: Deploy (universal)` | Deploy test for shared system roles. Same diff-driven whitelist resolution as `test-deploy-compose.yml`. | reusable | `distros` (required), `whitelist` (optional; explicit value wins over diff) | -| [test-deploy-workstation.yml](../../../../../.github/workflows/test-deploy-workstation.yml): `๐Ÿ“ฆ Test: Deploy (workstation)` | Deploy test for workstation and `desk-*` roles. Same diff-driven whitelist resolution as `test-deploy-compose.yml`. | reusable | `distros` (required), `whitelist` (optional; explicit value wins over diff) | -| [test-deploy-local.yml](../../../../../.github/workflows/test-deploy-local.yml): `๐Ÿ“ฆ Test: Deploy (local)` | Local/self-hosted deploy test. Intended for `act` or manual dispatch, not part of the orchestrator. Does NOT apply the diff-driven whitelist resolution; the input is used verbatim. | manual | `test_deploy_type` (`server`/`universal`/`workstation`, default `server`), `distros` (default `debian`), `whitelist` (optional) | +| [test-deploy-compose.yml](../../../../../.github/workflows/test-deploy-compose.yml): `๐Ÿ“ฆ Test: Deploy (compose)` | Deploy test (compose mode) across all deployment types (`INFINITO_DISCOVER_ALL`; lifecycle-filtered to `alpha beta rc stable`, so `server`/`universal`/`workstation` scopes but not just `web-*`). When `whitelist` is empty, the discover job derives one from the branch's diff vs `origin/main`; see the "Diff-driven app selection" subsection in [pipeline.md](../../../artefact/git/pipeline.md). | reusable | `distros` (required), `whitelist` (optional; explicit value wins over diff) | +| [test-deploy-swarm.yml](../../../../../.github/workflows/test-deploy-swarm.yml): `๐Ÿ Test: Deploy (swarm)` | Deploy test (swarm mode) across the full application matrix; each app gets a simulated 3-node DinD cluster with an NFS server, then a drain/reschedule state-survival assertion. Same diff-driven whitelist resolution as `test-deploy-compose.yml`. | reusable, manual | `whitelist` (optional; explicit value wins over diff) | | [test-install-make.yml](../../../../../.github/workflows/test-install-make.yml): `๐Ÿ“ฅ Test: Install Make` | Validates the `make install` entry points. | reusable | none | | [test-install-pkgmgr.yml](../../../../../.github/workflows/test-install-pkgmgr.yml): `๐Ÿ“ฅ Test: Install Package Manager` | Validates installation via the upstream package manager. | reusable | none | | [test-environment.yml](../../../../../.github/workflows/test-environment.yml): `๐Ÿ’ป Test: Development Environment` | Builds and exercises the dev-runtime image matrix. | reusable, manual | none | diff --git a/scripts/github/resolve/output_apps.sh b/scripts/github/resolve/output_apps.sh index 0d89699a94..552b9f8548 100755 --- a/scripts/github/resolve/output_apps.sh +++ b/scripts/github/resolve/output_apps.sh @@ -2,7 +2,6 @@ # # Resolve the app list and write it to GITHUB_OUTPUT. # Inputs via env (forwarded to scripts/meta/resolve/apps.sh): -# INFINITO_DEPLOY_TYPE โ€” required (server|workstation|universal) # INFINITO_WHITELIST โ€” optional space-separated allowlist set -euo pipefail diff --git a/scripts/meta/resolve/apps.sh b/scripts/meta/resolve/apps.sh index 8675000208..f816ec9335 100755 --- a/scripts/meta/resolve/apps.sh +++ b/scripts/meta/resolve/apps.sh @@ -1,18 +1,15 @@ #!/usr/bin/env bash set -euo pipefail -# Purpose (SRP): Return JSON list of apps based on deployment type, -# optionally filtered by lifecycle and CI storage constraints. +# Purpose (SRP): Return JSON list of every application role (all deployment +# types), filtered by lifecycle and CI storage constraints. # # Inputs via env: -# INFINITO_DEPLOY_TYPE = server|workstation|universal (required) # INFINITO_WHITELIST = optional space-separated list of app ids to keep # # Output: # JSON array to stdout (single line, always valid) -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE is required (server|workstation|universal)}" - PYTHON="${PYTHON:-python3}" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" @@ -86,15 +83,15 @@ run_meta_cli() { lifecycles_args=(--lifecycles alpha beta rc stable) # ------------------------------------------------------------ -# 1) Get JSON list from container (keep as JSON) +# 1) Resolve the candidate app set: every type's apps (lifecycle-filtered), +# flattened across the type groups + deduped into one JSON array. # ------------------------------------------------------------ apps_json="$( run_meta_cli \ -m cli.meta.roles.applications.type \ --format json \ - --type "${INFINITO_DEPLOY_TYPE}" \ "${lifecycles_args[@]}" | - json_compact_array + jq -c '[.[][]] | unique' )" # ------------------------------------------------------------ diff --git a/scripts/meta/resolve/input.sh b/scripts/meta/resolve/input.sh deleted file mode 100755 index 05dd38907b..0000000000 --- a/scripts/meta/resolve/input.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Resolve effective workflow parameters (STRICT MODE) -# -# Required: -# INFINITO_DEPLOY_TYPE (server|workstation|universal) -# INFINITO_DISTROS (space-separated distro list, e.g. "arch debian") -# -# Always defined: -# INFINITO_WHITELIST (may be empty, but will always be set) -# -# Provided either via: -# - act --env -# - workflow_dispatch inputs (forwarded as INPUT_*) -# -# Writes: -# - to $GITHUB_OUTPUT: test_deploy_type, distros, whitelist -# - to $GITHUB_ENV: INFINITO_DEPLOY_TYPE, INFINITO_DISTROS, INFINITO_WHITELIST - -: "${GITHUB_OUTPUT:?GITHUB_OUTPUT must be set (running inside GitHub Actions or act)}" -: "${GITHUB_ENV:?GITHUB_ENV must be set (running inside GitHub Actions or act)}" - -# Priority: -# 1) real env -# 2) workflow inputs (passed via env by workflow step) -# Script runs in GHA workflow context where .env is not loaded; the INPUT_* fallback IS the SPOT here. -INFINITO_DEPLOY_TYPE="${INFINITO_DEPLOY_TYPE:-${INPUT_TEST_DEPLOY_TYPE:-}}" # nocheck: gha-input-bridge -INFINITO_DISTROS="${INFINITO_DISTROS:-${INPUT_DISTROS:-}}" # nocheck: gha-input-bridge - -# INFINITO_WHITELIST must always exist, but may be empty -INFINITO_WHITELIST="${INFINITO_WHITELIST:-${INPUT_WHITELIST:-}}" # nocheck: gha-input-bridge -INFINITO_WHITELIST="${INFINITO_WHITELIST:-}" # force defined even if still empty - -# Hard requirements -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE must be set (server|workstation|universal)}" -: "${INFINITO_DISTROS:?INFINITO_DISTROS must be set (e.g. \"arch debian ubuntu\")}" - -case "${INFINITO_DEPLOY_TYPE}" in -server | workstation | universal) ;; -*) - echo "Invalid INFINITO_DEPLOY_TYPE: ${INFINITO_DEPLOY_TYPE}" >&2 - echo "Allowed: server | workstation | universal" >&2 - exit 2 - ;; -esac - -echo "Resolved inputs:" -echo " INFINITO_DEPLOY_TYPE=${INFINITO_DEPLOY_TYPE}" -echo " INFINITO_DISTROS=${INFINITO_DISTROS}" -echo " INFINITO_WHITELIST=${INFINITO_WHITELIST}" - -# Export outputs for workflow -{ - echo "test_deploy_type=${INFINITO_DEPLOY_TYPE}" - echo "distros=${INFINITO_DISTROS}" - echo "whitelist=${INFINITO_WHITELIST}" -} >>"${GITHUB_OUTPUT}" - -# Export env for subsequent steps -{ - echo "INFINITO_DEPLOY_TYPE=${INFINITO_DEPLOY_TYPE}" - echo "INFINITO_DISTROS=${INFINITO_DISTROS}" - echo "INFINITO_WHITELIST=${INFINITO_WHITELIST}" -} >>"${GITHUB_ENV}" diff --git a/scripts/tests/deploy/act/README.md b/scripts/tests/deploy/act/README.md index 07b5cb7e66..537daa51a1 100644 --- a/scripts/tests/deploy/act/README.md +++ b/scripts/tests/deploy/act/README.md @@ -9,6 +9,4 @@ For the canonical Make target index that invokes these helpers, see [make.md](.. | Command | What it does | Notes | |---|---|---| -| `all.sh` | Runs `test-deploy-local.yml` across all selected distros. | Uses a linear matrix and passes the selected distro list through `INFINITO_DISTROS`. | -| `app.sh` | Runs `test-deploy-local.yml` for one app. | Uses `whitelist` to limit the workflow to the selected app. | -| `workflow.sh` | Runs any workflow file through `act`. | Supports custom job, matrix, container, network, and image settings. | +| `workflow.sh` | Runs any workflow file through `act`. | Supports custom job, matrix, container, network, and image settings. Invoked via `make act-workflow ACT_WORKFLOW=`. | diff --git a/scripts/tests/deploy/act/all.sh b/scripts/tests/deploy/act/all.sh deleted file mode 100755 index 2d630cbde1..0000000000 --- a/scripts/tests/deploy/act/all.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Run local deploy workflow via act for ALL apps (linear matrix) -# Required: -# INFINITO_DEPLOY_TYPE server|workstation|universal -# INFINITO_DISTRO e.g. arch, debian, ubuntu - -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE is not set (server|workstation|universal)}" -: "${INFINITO_DISTRO:?INFINITO_DISTRO is not set (e.g. arch, debian, ubuntu)}" - -case "${INFINITO_DEPLOY_TYPE}" in -server | workstation | universal) ;; -*) - echo "Invalid INFINITO_DEPLOY_TYPE: ${INFINITO_DEPLOY_TYPE}" >&2 - echo "Allowed: server | workstation | universal" >&2 - exit 2 - ;; -esac - -echo "=== act: deploy local (type=${INFINITO_DEPLOY_TYPE}, distros=${INFINITO_DISTRO}) ===" - -act workflow_dispatch \ - -W .github/workflows/test-deploy-local.yml \ - --input test_deploy_type="${INFINITO_DEPLOY_TYPE}" \ - --input distros="${INFINITO_DISTRO}" \ - --input whitelist="" \ - --container-options "--privileged" \ - --network host diff --git a/scripts/tests/deploy/act/app.sh b/scripts/tests/deploy/act/app.sh deleted file mode 100755 index 9620f7b387..0000000000 --- a/scripts/tests/deploy/act/app.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Run local deploy workflow via act for a single app (linear matrix) -# Required: -# apps e.g. web-app-nextcloud -# INFINITO_DEPLOY_TYPE server|workstation|universal -# INFINITO_DISTRO e.g. arch, debian, ubuntu - -: "${apps:?apps is not set (e.g. apps=web-app-nextcloud)}" -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE is not set (server|workstation|universal)}" -: "${INFINITO_DISTRO:?INFINITO_DISTRO is not set (e.g. arch, debian, ubuntu)}" - -case "${INFINITO_DEPLOY_TYPE}" in -server | workstation | universal) ;; -*) - echo "Invalid INFINITO_DEPLOY_TYPE: ${INFINITO_DEPLOY_TYPE}" >&2 - echo "Allowed: server | workstation | universal" >&2 - exit 2 - ;; -esac - -echo "=== act: deploy local (type=${INFINITO_DEPLOY_TYPE}, app=${apps}, distros=${INFINITO_DISTRO}) ===" - -act workflow_dispatch \ - -W .github/workflows/test-deploy-local.yml \ - --input test_deploy_type="${INFINITO_DEPLOY_TYPE}" \ - --input distros="${INFINITO_DISTRO}" \ - --input whitelist="${apps}" \ - --container-options "--privileged" \ - --network host diff --git a/scripts/tests/deploy/ci/all.sh b/scripts/tests/deploy/ci/all.sh index 0ab153ae91..8cc0ab7146 100755 --- a/scripts/tests/deploy/ci/all.sh +++ b/scripts/tests/deploy/ci/all.sh @@ -10,7 +10,6 @@ set -euo pipefail # # Required env: # apps="web-app-keycloak" -# INFINITO_DEPLOY_TYPE="server|workstation|universal" # INFINITO_DISTROS="arch debian ubuntu fedora centos" # INFINITO_INVENTORY_DIR="/path/to/inventory" # @@ -35,18 +34,9 @@ else fi : "${apps:?apps is required (e.g. apps=web-app-keycloak)}" -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE is required (server|workstation|universal)}" : "${INFINITO_DISTROS:?INFINITO_DISTROS is required (e.g. 'arch debian ubuntu fedora centos')}" : "${INFINITO_INVENTORY_DIR:?INFINITO_INVENTORY_DIR is required}" -case "${INFINITO_DEPLOY_TYPE}" in -server | workstation | universal) ;; -*) - echo "[ERROR] Invalid INFINITO_DEPLOY_TYPE: ${INFINITO_DEPLOY_TYPE}" >&2 - exit 2 - ;; -esac - : "${PYTHON:=python3}" : "${MISSING_ONLY:=true}" if [[ -z "${MAX_TOTAL_SECONDS+x}" ]]; then @@ -128,7 +118,7 @@ for distro in "${distro_arr[@]}"; do fi fi - echo "=== Running dedicated distro deploy: distro=${distro} app=${apps} type=${INFINITO_DEPLOY_TYPE} ===" + echo "=== Running dedicated distro deploy: distro=${distro} app=${apps} ===" if [[ -n "${remaining}" ]]; then echo ">>> Time budget: remaining=${remaining}s max_seen=${max_seen}s" fi @@ -172,7 +162,7 @@ total="$((global_end - global_start))" echo echo "=== Summary ===" -echo "app=${apps} type=${INFINITO_DEPLOY_TYPE}" +echo "app=${apps}" echo "ran=${ran} skipped=${skipped} failed=${failed}" echo "total_runtime=${total}s max_seen_duration=${max_seen}s" if [[ -n "${deadline}" ]]; then diff --git a/scripts/tests/deploy/local/deploy/README.md b/scripts/tests/deploy/local/deploy/README.md index 9acefe67d6..b81cbddec4 100644 --- a/scripts/tests/deploy/local/deploy/README.md +++ b/scripts/tests/deploy/local/deploy/README.md @@ -29,8 +29,8 @@ The `container/` subtree holds the in-container halves invoked by the host wrapp | Entry point | What it does | Key inputs | Notes | |---|---|---|---| -| `apps/initialize/all.sh` | Discovers apps, creates `devices.yml`, and deploys all discovered apps. | `INFINITO_DISTRO`, `INFINITO_DEPLOY_TYPE`, `INFINITO_INVENTORY_DIR` | Fresh all-app inventory path. | +| `apps/initialize/all.sh` | Discovers apps, creates `devices.yml`, and deploys all discovered apps. | `INFINITO_DISTRO`, `INFINITO_INVENTORY_DIR` | Fresh all-app inventory path. | | `apps/initialize/selection.sh ` | Creates `devices.yml` for one or more apps and deploys them. | `apps=` | Init and deploy path for a specific app set. | -| `apps/reinstall/selection.sh` | Recreates `devices.yml` and deploys one or more apps twice with `ASYNC_ENABLED=false` and `ASYNC_ENABLED=true`. | `INFINITO_DISTRO`, `INFINITO_INVENTORY_DIR`, `INFINITO_DEPLOY_TYPE`, `apps` | Baseline and recovery path; purges entities first. | -| `apps/update/all.sh` | Deploys every app from an existing inventory. | `INFINITO_DISTRO`, `INFINITO_DEPLOY_TYPE`, `INFINITO_INVENTORY_DIR` | Requires `${INFINITO_INVENTORY_DIR}/devices.yml` and `.password`. | -| `apps/update/selection.sh` | Runs a targeted `infinito administration deploy dedicated` for one or more apps. | `apps`, `INFINITO_DEPLOY_TYPE`, `INFINITO_CONTAINER`, `INFINITO_DEBUG`, `INFINITO_INVENTORY_DIR` | Reuses `devices.yml`. | +| `apps/reinstall/selection.sh` | Recreates `devices.yml` and deploys one or more apps twice with `ASYNC_ENABLED=false` and `ASYNC_ENABLED=true`. | `INFINITO_DISTRO`, `INFINITO_INVENTORY_DIR`, `apps` | Baseline and recovery path; purges entities first. | +| `apps/update/all.sh` | Deploys every app from an existing inventory. | `INFINITO_DISTRO`, `INFINITO_INVENTORY_DIR` | Requires `${INFINITO_INVENTORY_DIR}/devices.yml` and `.password`. | +| `apps/update/selection.sh` | Runs a targeted `infinito administration deploy dedicated` for one or more apps. | `apps`, `INFINITO_CONTAINER`, `INFINITO_DEBUG`, `INFINITO_INVENTORY_DIR` | Reuses `devices.yml`. | diff --git a/scripts/tests/deploy/local/deploy/apps/initialize/README.md b/scripts/tests/deploy/local/deploy/apps/initialize/README.md index 12d6dd319e..f0a999f99e 100644 --- a/scripts/tests/deploy/local/deploy/apps/initialize/README.md +++ b/scripts/tests/deploy/local/deploy/apps/initialize/README.md @@ -7,7 +7,7 @@ Existing container state and shared entities are kept untouched. | Entry point | Scope | |---|---| -| `all.sh` | every discovered application (filtered by `INFINITO_DEPLOY_TYPE` and optional `INFINITO_WHITELIST`) | +| `all.sh` | every discovered application (optionally filtered by `INFINITO_WHITELIST`) | | `selection.sh ` | one or more apps passed via `apps` or as a positional argument | ## When to use ๐ŸŽฏ diff --git a/scripts/tests/deploy/local/deploy/apps/initialize/all.sh b/scripts/tests/deploy/local/deploy/apps/initialize/all.sh index 6ed807a657..aaef32ddab 100755 --- a/scripts/tests/deploy/local/deploy/apps/initialize/all.sh +++ b/scripts/tests/deploy/local/deploy/apps/initialize/all.sh @@ -14,7 +14,6 @@ source "${SCRIPT_DIR}/../../../utils/cache-retry.sh" # Required environment # --------------------------------------------------------------------------- : "${INFINITO_DISTRO:?INFINITO_DISTRO must be set (arch|debian|ubuntu|fedora|centos)}" -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE must be set (server|workstation|universal)}" : "${INFINITO_INVENTORY_DIR:?INFINITO_INVENTORY_DIR must be set (e.g. /etc/inventories/local-full-server)}" : "${INFINITO_INVENTORY_FILE:?INFINITO_INVENTORY_FILE is not set โ€” source scripts/meta/env/load.sh first}" : "${INFINITO_INVENTORY_VARS_FILE:?INFINITO_INVENTORY_VARS_FILE is not set โ€” source scripts/meta/env/load.sh first}" @@ -27,7 +26,6 @@ RUNTIME_VARS_JSON='{"RUNTIME":"dev"}' echo "=== local full deploy (development compose stack) ===" echo "distro = ${INFINITO_DISTRO}" -echo "type = ${INFINITO_DEPLOY_TYPE}" echo "limit = ${INFINITO_LIMIT_HOST}" echo "inventory_dir = ${INFINITO_INVENTORY_DIR}" echo "whitelist = ${INFINITO_WHITELIST}" @@ -43,7 +41,7 @@ echo ">>> Starting development compose stack (no build)" # --------------------------------------------------------------------------- # 2) Discover apps on HOST (needs docker compose) # --------------------------------------------------------------------------- -echo ">>> Discovering apps on host via scripts/meta/resolve/apps.sh (INFINITO_DEPLOY_TYPE=${INFINITO_DEPLOY_TYPE})" +echo ">>> Discovering apps on host via scripts/meta/resolve/apps.sh" # IMPORTANT: # - compose can emit warnings on STDOUT (depending on version/config) @@ -51,8 +49,7 @@ echo ">>> Discovering apps on host via scripts/meta/resolve/apps.sh (INFINITO_DE # - PYTHON from host venv must NOT be used inside container exec calls discover_out="$( set +e - INFINITO_DEPLOY_TYPE="${INFINITO_DEPLOY_TYPE}" \ - INFINITO_WHITELIST="${INFINITO_WHITELIST}" \ + INFINITO_WHITELIST="${INFINITO_WHITELIST}" \ PYTHON=python3 \ scripts/meta/resolve/apps.sh 2> >(cat >&2) | jq -c 'if type=="array" then . else [] end' 2>/dev/null @@ -63,7 +60,7 @@ discover_out="$( if [[ -z "${discover_out}" ]]; then echo "ERROR: apps discovery produced empty output" >&2 echo "DEBUG: raw apps.sh output (first 50 lines):" >&2 - INFINITO_DEPLOY_TYPE="${INFINITO_DEPLOY_TYPE}" INFINITO_WHITELIST="${INFINITO_WHITELIST}" PYTHON=python3 \ + INFINITO_WHITELIST="${INFINITO_WHITELIST}" PYTHON=python3 \ scripts/meta/resolve/apps.sh 2>&1 | sed -n '1,50p' >&2 exit 2 fi diff --git a/scripts/tests/deploy/local/deploy/apps/reinstall/selection.sh b/scripts/tests/deploy/local/deploy/apps/reinstall/selection.sh index b07ff75b5d..b228330f78 100755 --- a/scripts/tests/deploy/local/deploy/apps/reinstall/selection.sh +++ b/scripts/tests/deploy/local/deploy/apps/reinstall/selection.sh @@ -8,7 +8,6 @@ set -euo pipefail # Required env: # INFINITO_DISTRO arch|debian|ubuntu|fedora|centos # INFINITO_INVENTORY_DIR /etc/inventories/local-full-server -# INFINITO_DEPLOY_TYPE server|workstation|universal # apps web-app-* # # Optional: @@ -20,17 +19,8 @@ PYTHON="${PYTHON:-python3}" : "${INFINITO_DISTRO:?INFINITO_DISTRO must be set (e.g. arch)}" : "${INFINITO_INVENTORY_DIR:?INFINITO_INVENTORY_DIR must be set}" -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE must be set (server|workstation|universal)}" : "${apps:?apps must be set (e.g. web-app-keycloak)}" -case "${INFINITO_DEPLOY_TYPE}" in -server | workstation | universal) ;; -*) - echo "[ERROR] Invalid INFINITO_DEPLOY_TYPE: ${INFINITO_DEPLOY_TYPE}" >&2 - exit 2 - ;; -esac - SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../../../../.." && pwd)" cd "${REPO_ROOT}" @@ -41,7 +31,7 @@ source "scripts/meta/env/load.sh" # shellcheck source=scripts/tests/deploy/local/utils/cache-retry.sh source "${SCRIPT_DIR}/../../../utils/cache-retry.sh" -echo "=== LOCAL: distro=${INFINITO_DISTRO} type=${INFINITO_DEPLOY_TYPE} app=${apps} full_cycle=${full_cycle:-false} ===" +echo "=== LOCAL: distro=${INFINITO_DISTRO} app=${apps} full_cycle=${full_cycle:-false} ===" echo "limit_host=${INFINITO_LIMIT_HOST}" echo "inventory_dir=${INFINITO_INVENTORY_DIR}" echo diff --git a/scripts/tests/deploy/local/deploy/apps/update/all.sh b/scripts/tests/deploy/local/deploy/apps/update/all.sh index 2c9f011f47..30efb3125f 100755 --- a/scripts/tests/deploy/local/deploy/apps/update/all.sh +++ b/scripts/tests/deploy/local/deploy/apps/update/all.sh @@ -5,7 +5,6 @@ set -euo pipefail # # Required: # INFINITO_DISTRO (arch|debian|ubuntu|fedora|centos) -# INFINITO_DEPLOY_TYPE (server|workstation|universal) # INFINITO_INVENTORY_DIR (e.g. /etc/inventories/local-full-server) # # Optional: @@ -27,7 +26,6 @@ REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../../../../.." && pwd)" cd "${REPO_ROOT}" : "${INFINITO_DISTRO:?INFINITO_DISTRO must be set (arch|debian|ubuntu|fedora|centos)}" -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE must be set (server|workstation|universal)}" : "${INFINITO_INVENTORY_DIR:?INFINITO_INVENTORY_DIR must be set (e.g. /etc/inventories/local-full-server)}" INFINITO_DEBUG="$(normalize_bool_or_default "${INFINITO_DEBUG:-}" false INFINITO_DEBUG)" @@ -57,7 +55,6 @@ fi echo "=== local run (ALL apps) ===" echo "distro = ${INFINITO_DISTRO}" -echo "type = ${INFINITO_DEPLOY_TYPE}" echo "limit = ${INFINITO_LIMIT_HOST}" echo "debug = ${INFINITO_DEBUG}" echo "inventory_dir = ${inv_dir}" @@ -71,8 +68,7 @@ echo # Recompute apps list (optional, but keeps filters consistent) apps_json="$( - INFINITO_DEPLOY_TYPE="${INFINITO_DEPLOY_TYPE}" \ - INFINITO_WHITELIST="${INFINITO_WHITELIST:-}" \ + INFINITO_WHITELIST="${INFINITO_WHITELIST:-}" \ scripts/meta/resolve/apps.sh )" diff --git a/scripts/tests/deploy/local/deploy/apps/update/selection.sh b/scripts/tests/deploy/local/deploy/apps/update/selection.sh index e4983de19a..8c3ab9eff1 100755 --- a/scripts/tests/deploy/local/deploy/apps/update/selection.sh +++ b/scripts/tests/deploy/local/deploy/apps/update/selection.sh @@ -4,13 +4,11 @@ set -euo pipefail # Update a selection of apps inside the running infinito container (reuses inventory, no down/up). # Expects (ALL required): # apps e.g. web-app-nextcloud -# INFINITO_DEPLOY_TYPE server|workstation|universal # INFINITO_CONTAINER e.g. infinito_nexus_arch # INFINITO_DEBUG true|false # INFINITO_INVENTORY_DIR e.g. /etc/inventories/local-full-server : "${apps:?apps is not set (e.g. apps=web-app-nextcloud)}" -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE is not set (server|workstation|universal)}" : "${INFINITO_CONTAINER:?INFINITO_CONTAINER is not set (e.g. infinito_nexus_arch)}" : "${INFINITO_DEBUG:?INFINITO_DEBUG is not set (true|false)}" : "${INFINITO_INVENTORY_DIR:?INFINITO_INVENTORY_DIR is not set (e.g. INFINITO_INVENTORY_DIR=/etc/inventories/local-full-server)}" @@ -27,15 +25,6 @@ if [[ -n "${variant:-}" ]]; then INFINITO_INVENTORY_FILE="${INFINITO_INVENTORY_DIR}/devices.yml" fi -case "${INFINITO_DEPLOY_TYPE}" in -server | workstation | universal) ;; -*) - echo "Invalid INFINITO_DEPLOY_TYPE: ${INFINITO_DEPLOY_TYPE}" >&2 - echo "Allowed: server | workstation | universal" >&2 - exit 2 - ;; -esac - case "${INFINITO_DEBUG}" in true | false) ;; *) @@ -51,7 +40,7 @@ REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../../../../.." && pwd)" # shellcheck source=scripts/tests/deploy/local/utils/cache-retry.sh source "${SCRIPT_DIR}/../../../utils/cache-retry.sh" -echo "=== rapid deploy: type=${INFINITO_DEPLOY_TYPE} app=${apps} container=${INFINITO_CONTAINER} debug=${INFINITO_DEBUG} ===" +echo "=== rapid deploy: app=${apps} container=${INFINITO_CONTAINER} debug=${INFINITO_DEBUG} ===" echo "inventory_dir=${INFINITO_INVENTORY_DIR}" deploy_with_cache_retry "update-${apps//[^A-Za-z0-9._-]/-}" -- \ diff --git a/scripts/tests/deploy/local/deploy/bundles/fresh.sh b/scripts/tests/deploy/local/deploy/bundles/fresh.sh index 9e969f0249..e4085e52bf 100755 --- a/scripts/tests/deploy/local/deploy/bundles/fresh.sh +++ b/scripts/tests/deploy/local/deploy/bundles/fresh.sh @@ -18,7 +18,6 @@ set -euo pipefail # full_cycle false (default) | true (set by `full_cycle=`) # INFINITO_DISTRO arch|debian|ubuntu|fedora|centos # INFINITO_INVENTORY_DIR /etc/inventories/local-full-server (typical) -# INFINITO_DEPLOY_TYPE server|workstation|universal : "${bundles:?bundles must be set (e.g. bundles=education-suite,startup-essentials)}" diff --git a/scripts/tests/deploy/local/deploy/bundles/update.sh b/scripts/tests/deploy/local/deploy/bundles/update.sh index 4e6508d9e1..26e09cc574 100755 --- a/scripts/tests/deploy/local/deploy/bundles/update.sh +++ b/scripts/tests/deploy/local/deploy/bundles/update.sh @@ -20,7 +20,6 @@ set -euo pipefail # INFINITO_DEBUG true (default) | false # INFINITO_DISTRO arch|debian|ubuntu|fedora|centos # INFINITO_INVENTORY_DIR /etc/inventories/local-full-server (typical) -# INFINITO_DEPLOY_TYPE server|workstation|universal # variant matrix round index to pin redeploy to (set by `variant=`) : "${bundles:?bundles must be set (e.g. bundles=education-suite,startup-essentials)}" diff --git a/scripts/tests/deploy/local/deploy/main.sh b/scripts/tests/deploy/local/deploy/main.sh index 24a76d6ea2..f8b2ea0bc2 100755 --- a/scripts/tests/deploy/local/deploy/main.sh +++ b/scripts/tests/deploy/local/deploy/main.sh @@ -20,8 +20,6 @@ set -euo pipefail # apps is set, runs the entity purge # before the deploy. # Short Make alias: purge -# INFINITO_DEPLOY_TYPE server | workstation | universal. Short -# Make alias: type. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../../.." && pwd)" @@ -72,7 +70,7 @@ elif [[ -n "${apps:-}" ]]; then else case "${MODE}" in initialize) - echo "=== local full deploy (type=${INFINITO_DEPLOY_TYPE}, distro=${INFINITO_DISTRO}) ===" + echo "=== local full deploy (distro=${INFINITO_DISTRO}) ===" target="${SCRIPT_DIR}/apps/initialize/all.sh" ;; reinstall) diff --git a/scripts/tests/deploy/local/reset/README.md b/scripts/tests/deploy/local/reset/README.md index 47c4a639bc..ac4fe4946f 100644 --- a/scripts/tests/deploy/local/reset/README.md +++ b/scripts/tests/deploy/local/reset/README.md @@ -8,7 +8,7 @@ For the canonical Make target index that invokes these helpers, see [make.md](.. | Entry point | What it does | Key inputs | Notes | |---|---|---|---| -| `inventory.sh` | Recreates `devices.yml` for all discovered apps without deploying them. | `INFINITO_DISTRO`, `INFINITO_DEPLOY_TYPE`, `INFINITO_INVENTORY_DIR` | Rebuilds the local inventory and keeps the runtime `.password` file. | +| `inventory.sh` | Recreates `devices.yml` for all discovered apps without deploying them. | `INFINITO_DISTRO`, `INFINITO_INVENTORY_DIR` | Rebuilds the local inventory and keeps the runtime `.password` file. | ## Script Map diff --git a/scripts/tests/deploy/local/reset/inventory.sh b/scripts/tests/deploy/local/reset/inventory.sh index a339b71dd0..e734a1467b 100755 --- a/scripts/tests/deploy/local/reset/inventory.sh +++ b/scripts/tests/deploy/local/reset/inventory.sh @@ -5,11 +5,9 @@ set -euo pipefail # # Required: # INFINITO_DISTRO (arch|debian|ubuntu|fedora|centos) -# INFINITO_DEPLOY_TYPE (server|workstation|universal) # INFINITO_INVENTORY_DIR (e.g. /etc/inventories/local-full-server) : "${INFINITO_DISTRO:?INFINITO_DISTRO must be set (arch|debian|ubuntu|fedora|centos)}" -: "${INFINITO_DEPLOY_TYPE:?INFINITO_DEPLOY_TYPE must be set (server|workstation|universal)}" : "${INFINITO_INVENTORY_DIR:?INFINITO_INVENTORY_DIR must be set (e.g. /etc/inventories/local-full-server)}" : "${INFINITO_INVENTORY_FILE:?INFINITO_INVENTORY_FILE is not set โ€” source scripts/meta/env/load.sh first}" : "${INFINITO_INVENTORY_VARS_FILE:?INFINITO_INVENTORY_VARS_FILE is not set โ€” source scripts/meta/env/load.sh first}" @@ -19,7 +17,6 @@ RUNTIME_VARS_JSON='{"RUNTIME":"dev","SYS_SERVICE_RUNNER_RETRIES":1}' echo "=== local inventory init (ALL apps) ===" echo "distro = ${INFINITO_DISTRO}" -echo "type = ${INFINITO_DEPLOY_TYPE}" echo "inventory_dir = ${INFINITO_INVENTORY_DIR}" echo @@ -30,8 +27,7 @@ echo ">>> Starting development compose stack (no build)" # 2) Discover apps on HOST (same as local/deploy/apps/initialize/all.sh) apps_json="$( - INFINITO_DEPLOY_TYPE="${INFINITO_DEPLOY_TYPE}" \ - INFINITO_WHITELIST="${INFINITO_WHITELIST:-}" \ + INFINITO_WHITELIST="${INFINITO_WHITELIST:-}" \ PYTHON=python3 \ scripts/meta/resolve/apps.sh )" diff --git a/tests/integration/meta/env/test_dotenv_generator.py b/tests/integration/meta/env/test_dotenv_generator.py index 1d6ed6539f..307c4a6dc4 100644 --- a/tests/integration/meta/env/test_dotenv_generator.py +++ b/tests/integration/meta/env/test_dotenv_generator.py @@ -57,7 +57,6 @@ EXPECTED_BASELINE_KEYS = frozenset( "INFINITO_DOCKER_VOLUME", "INFINITO_DOCKER_MOUNT", "INFINITO_OUTER_NETWORK_MTU", - "INFINITO_DEPLOY_TYPE", "INFINITO_TEST_PATTERN", "INFINITO_TEST_RUNNER", "INFINITO_LINT_RUNNER", diff --git a/utils/env/handlers/passthrough.py b/utils/env/handlers/passthrough.py index e50124753d..44424b2c1d 100644 --- a/utils/env/handlers/passthrough.py +++ b/utils/env/handlers/passthrough.py @@ -48,7 +48,6 @@ STATIC_KEYS = ( "INFINITO_SWARM_LAB_NET_NAME", "INFINITO_SWARM_NFS_EXPORT_BASE", "INFINITO_PLAYWRIGHT_KEEP", - "INFINITO_DEPLOY_TYPE", "INFINITO_TEST_PATTERN", "INFINITO_TEST_RUNNER", "INFINITO_LINT_RUNNER",