Skip to content

Commit e3afc2a

Browse files
committed
refactor!: extract container module and standardise driver hooks
Extract container.py from monolithic incus.py. Standardise driver hooks in Driver base class. Single-relay CLI arguments (breaking). Deploy and test subcommands now take one relay name instead of a list. SetupError replaces exit-code error handling. Drivers raise SetupError on failure instead of returning non-zero ints. cli.main() catches it at the top level. Dead code and test cleanup.
1 parent 1372d58 commit e3afc2a

12 files changed

Lines changed: 1174 additions & 1353 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Test
22

33
on:
4+
push:
5+
branches: [ main ]
6+
tags-ignore: [ '**' ]
47
pull_request:
58
branches: [ main, master ]
69
workflow_call:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Re-initialize from scratch (destroys everything first):
5959
**Deploy chatmail relays** (creates containers if needed, then deploys).
6060
The `--source` argument controls where the code comes from:
6161

62-
cmlxc deploy-cmdeploy --source @main cm0 cm1
62+
cmlxc deploy-cmdeploy --source @main cm0
6363
cmlxc deploy-madmail --source @main mad1
6464
cmlxc deploy-madmail --source @main --ipv4-only mad1
6565

@@ -170,7 +170,7 @@ Each relay is locked to a single deployment driver (`cmdeploy` or
170170
Drivers live in `driver_cmdeploy.py` and `driver_madmail.py`.
171171
Each driver module exports its CLI subcommand metadata,
172172
builder init, and deploy orchestration.
173-
`cli.py` generates the `deploy-*` subcommands from a `DEPLOY_DRIVERS` list.
173+
`cli.py` generates the `deploy-*` subcommands from a `DRIVER_BY_NAME` mapping.
174174

175175

176176
- **cmdeploy** -- runs `cmdeploy run` from the builder container over SSH

0 commit comments

Comments
 (0)