feat: add enterprise mirror support for air-gap deployments (Phase 1) #209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Implements complete enterprise air-gap support (Issue #208) with both Phase 1 (mirrors) and Phase 2 (vendoring) in a single PR.
Phase 1: Environment Variable Mirrors
Core Infrastructure
BAZEL_WASM_GITHUB_MIRRORsupporthttps://github.comJavaScript Toolchain
BAZEL_NODEJS_MIRROR: Node.js binary downloads (default:https://nodejs.org)BAZEL_NPM_REGISTRY: npm package registry (default:https://registry.npmjs.org).npmrcwhen custom registry specifiedGo Toolchain
BAZEL_GO_MIRROR: Go SDK downloads (default:https://go.dev)BAZEL_GOPROXY: Go module proxy (default:https://proxy.golang.org,direct)Documentation
Phase 2: Bazel-Native Vendoring (NEW!)
Pure Bazel Infrastructure - ZERO Shell Scripts
tools/vendor/vendor_toolchains.bzl: Repository rule for downloading toolchains
secure_downloadinfrastructuretools/vendor/defs.bzl: Export action using file-ops WASM component
third_party/tools/vendor/README.md: Comprehensive documentation
Enhanced Offline Mode
BAZEL_WASM_OFFLINEsupportthird_party/toolchains/before downloadingIntegration Tests
Complete Enterprise Workflow
Scenario 1: Corporate Mirror (Phase 1)
Scenario 2: Air-Gap with Vendoring (Phase 2)
Scenario 3: Hybrid (Best of Both)
Benefits
✅ Zero Breaking Changes: All environment variables default to public URLs
✅ Zero Shell Scripts: Pure Bazel + WASM component for vendoring
✅ Enterprise Ready: Supports JFrog, Nexus, Harbor, Minio
✅ Security: Maintains mandatory SHA256 checksum verification
✅ Air-Gap Capable: Complete offline builds with vendoring
✅ Cross-Platform: Works identically on Linux/Mac/Windows
✅ Backward Compatible: Existing builds work without any configuration
✅ Hermetic: No system dependencies, pure Bazel infrastructure
Testing
Phase 1:
Phase 2:
Architecture
Phase 1: Mirror Override
Phase 2: Offline Vendoring
File Changes Summary
.bazelrctoolchains/secure_download.bzltoolchains/jco_toolchain.bzltoolchains/tinygo_toolchain.bzltools/vendor/vendor_toolchains.bzltools/vendor/defs.bzltools/vendor/README.mdtest/vendor_integration/BUILD.bazelTotal: 832 lines added, 21 lines removed
Related
Closes #208
Next Steps
After merge: