feat(build): add level-based parallel builds with --parallel and configurable concurrency

This commit is contained in:
2026-02-07 04:46:06 +00:00
parent b04b8c9033
commit 04b75b42f3
7 changed files with 256 additions and 49 deletions

View File

@@ -96,6 +96,18 @@ ts/
- `@push.rocks/smartcli`: CLI framework
- `@push.rocks/projectinfo`: Project metadata
## Parallel Builds
`--parallel` flag enables level-based parallel Docker builds:
```bash
tsdocker build --parallel # parallel, default concurrency (4)
tsdocker build --parallel=8 # parallel, concurrency 8
tsdocker build --parallel --cached # works with both modes
```
Implementation: `Dockerfile.computeLevels()` groups topologically sorted Dockerfiles into dependency levels. `Dockerfile.runWithConcurrency()` provides a worker-pool pattern for bounded concurrency. Both are public static methods on the `Dockerfile` class. The parallel logic exists in both `Dockerfile.buildDockerfiles()` (standard mode) and `TsDockerManager.build()` (cached mode).
## Build Status
- Build: ✅ Passes