feat(build): add level-based parallel builds with --parallel and configurable concurrency
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user