Files
computer-playbook/.github/workflows/test-deploy.yml
Kevin Veen-Birkenbach 0d18d86243 Add --vars support to inventory creation, implement deep JSON overrides for host_vars, and update CI workflow to pass MASK_CREDENTIALS_IN_LOGS=false.
Includes:
- New apply_vars_overrides() with deep merge logic
- New --vars CLI argument in cli/create/inventory.py
- Added unit tests for vars handling in test_inventory.py
- Updated test-deploy workflow to pass --vars in all deploy phases

Ref: ChatGPT conversation https://chatgpt.com/share/69320f49-6c00-800f-8875-49d36935ae3a
2025-12-04 23:48:43 +01:00

83 lines
2.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build & Test Infinito.Nexus CLI in Docker Container
on:
push:
branches:
- main
- master
- develop
- "*"
pull_request:
jobs:
test-deploy:
runs-on: ubuntu-latest
timeout-minutes: 240
env:
EXCLUDED_ROLES: >
drv-lid-switch,
svc-db-memcached,
svc-db-redis,
svc-net-wireguard-core,
svc-net-wireguard-firewalled,
svc-net-wireguard-plain,
svc-bkp-loc-2-usb,
svc-bkp-rmt-2-loc,
svc-opt-keyboard-color,
svc-opt-ssd-hdd,
web-app-bridgy-fed,
web-app-oauth2-proxy,
web-app-postmarks,
web-app-elk,
web-app-syncope,
web-app-socialhome,
web-svc-xmpp,
INFINITO_IMAGE: infinito:latest
steps:
- name: Main Checkout repository
uses: actions/checkout@v4
- name: Show Docker version
run: docker version
# 1) First deploy: normal + debug (mit Build)
- name: First deploy (normal + debug)
run: |
python -m cli.deploy.container run --image "$INFINITO_IMAGE" --build -- \
--exclude "$EXCLUDED_ROLES" \
--vars '{"MASK_CREDENTIALS_IN_LOGS": false}' \
--authorized-keys "ssh-ed25519 AAAA_TEST_DUMMY_KEY github-ci-dummy@infinito" \
-- \
-T server \
--debug \
--skip-cleanup \
--skip-tests
# 2) Second deploy: reset + debug (ohne Build, nur reuse Image)
- name: Second deploy (--reset --debug)
run: |
python -m cli.deploy.container run --image "$INFINITO_IMAGE" -- \
--exclude "$EXCLUDED_ROLES" \
--vars '{"MASK_CREDENTIALS_IN_LOGS": false}' \
--authorized-keys "ssh-ed25519 AAAA_TEST_DUMMY_KEY github-ci-dummy@infinito" \
-- \
-T server \
--reset \
--debug \
--skip-cleanup \
--skip-tests
# 3) Third deploy: async deploy no debug
- name: Third deploy (async deploy no debug)
run: |
python -m cli.deploy.container run --image "$INFINITO_IMAGE" -- \
--exclude "$EXCLUDED_ROLES" \
--vars '{"MASK_CREDENTIALS_IN_LOGS": false}' \
--authorized-keys "ssh-ed25519 AAAA_TEST_DUMMY_KEY github-ci-dummy@infinito" \
-- \
-T server \
--skip-cleanup \
--skip-tests