mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-07 01:46:50 +00:00
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
83 lines
2.4 KiB
YAML
83 lines
2.4 KiB
YAML
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 |