Commit 7ce6139
committed
feat: add Bazel-native toolchain vendoring for air-gap deployments
Implements Phase 2 of enterprise air-gap support (Issue #208) using pure
Bazel + file-ops WASM component with ZERO shell scripts.
New Infrastructure:
- tools/vendor/vendor_toolchains.bzl: Repository rule for downloading toolchains
to Bazel cache using existing secure_download infrastructure
- tools/vendor/defs.bzl: Export action using file-ops WASM component for
copying vendored files to third_party/ (no shell commands)
- tools/vendor/README.md: Comprehensive documentation with usage examples
Enhanced Features:
- toolchains/secure_download.bzl: Add BAZEL_WASM_OFFLINE environment variable
support to use vendored files from third_party/ instead of downloading
Testing:
- test/vendor_integration/: Integration tests validating vendoring infrastructure
Workflow:
1. bazel fetch @vendored_toolchains//... # Download to Bazel cache
2. bazel run @vendored_toolchains//:export_to_third_party # Export to third_party/
3. export BAZEL_WASM_OFFLINE=1 # Enable offline mode
4. bazel build //examples/basic:hello_component # Build uses vendored files
Benefits:
- Zero shell scripts - Pure Bazel + WASM component
- Reuses file-ops component for all file operations
- Cross-platform (Linux/Mac/Windows)
- Hermetic builds with SHA256 verification
- Supports corporate mirrors (Phase 1) + offline vendoring (Phase 2)
Architecture:
- Repository rules download toolchains (~1.8 GB for all platforms)
- File-ops WASM component organizes files (no bash/python/etc)
- third_party/toolchains/ used when BAZEL_WASM_OFFLINE=1
Storage Options:
- Commit to git (simple)
- Git LFS (better for binaries)
- Network share (enterprise standard)
- Artifact server (best for large orgs)
Phase 2 completes the air-gap story alongside Phase 1 mirror support.
Issue: #2081 parent 7858ddd commit 7ce6139
File tree
6 files changed
+732
-2
lines changed- test/vendor_integration
- toolchains
- tools/vendor
6 files changed
+732
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
27 | 51 | | |
28 | 52 | | |
29 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments