@@ -887,6 +887,11 @@ type BuildConfig struct {
887
887
// to run cmd/go tests fetching from the network.
888
888
needsGoProxy bool
889
889
890
+ // privateGoProxy for builder has it's own Go proxy instead of
891
+ // proxy.golang.org, after setting this builder will respect
892
+ // GOPROXY enviroment value.
893
+ privateGoProxy bool
894
+
890
895
// InstallRacePackages controls which packages to "go install
891
896
// -race <pkgs>" after running make.bash (or equivalent). If
892
897
// the builder ends in "-race", the default if non-nil is just
@@ -959,7 +964,7 @@ func (c *BuildConfig) Env() []string {
959
964
func (c * BuildConfig ) ModulesEnv (repo string ) (env []string ) {
960
965
// EC2 and reverse builders should set the public module proxy
961
966
// address instead of the internal proxy.
962
- if (c .HostConfig ().isEC2 || c .IsReverse ()) && repo != "go" {
967
+ if (c .HostConfig ().isEC2 || c .IsReverse ()) && repo != "go" && ! c . PrivateGoProxy () {
963
968
env = append (env , "GOPROXY=https://proxy.golang.org" )
964
969
}
965
970
switch repo {
@@ -1155,6 +1160,9 @@ func (c *BuildConfig) IsTryOnly() bool { return c.tryOnly }
1155
1160
1156
1161
func (c * BuildConfig ) NeedsGoProxy () bool { return c .needsGoProxy }
1157
1162
1163
+ // PrivateGoProxy for builder has it's own Go proxy instead of proxy.golang.org
1164
+ func (c * BuildConfig ) PrivateGoProxy () bool { return c .privateGoProxy }
1165
+
1158
1166
// BuildsRepoPostSubmit reports whether the build configuration type c
1159
1167
// should build the given repo ("go", "net", etc) and branch
1160
1168
// ("master", "release-branch.go1.12") as a post-submit build
@@ -2517,6 +2525,7 @@ func init() {
2517
2525
Name : "linux-mips64le-mengzhuo" ,
2518
2526
buildsRepo : onlyMasterDefault ,
2519
2527
distTestAdjust : mipsDistTestPolicy ,
2528
+ privateGoProxy : true , // this builder is behind firewall
2520
2529
})
2521
2530
addBuilder (BuildConfig {
2522
2531
FlakyNet : true ,
@@ -2589,6 +2598,7 @@ func init() {
2589
2598
FlakyNet : true ,
2590
2599
buildsRepo : onlyMasterDefault ,
2591
2600
distTestAdjust : riscvDistTestPolicy ,
2601
+ privateGoProxy : true , // this builder is behind firewall
2592
2602
})
2593
2603
addBuilder (BuildConfig {
2594
2604
Name : "linux-s390x-ibm" ,
@@ -2701,11 +2711,12 @@ func init() {
2701
2711
},
2702
2712
})
2703
2713
addBuilder (BuildConfig {
2704
- Name : "linux-amd64-wsl" ,
2705
- HostType : "host-linux-amd64-wsl" ,
2706
- Notes : "Windows 10 WSL2 Ubuntu" ,
2707
- FlakyNet : true ,
2708
- SkipSnapshot : true , // The builder has a slow uplink bandwidth.
2714
+ Name : "linux-amd64-wsl" ,
2715
+ HostType : "host-linux-amd64-wsl" ,
2716
+ Notes : "Windows 10 WSL2 Ubuntu" ,
2717
+ FlakyNet : true ,
2718
+ SkipSnapshot : true , // The builder has a slow uplink bandwidth.
2719
+ privateGoProxy : true , // this builder is behind firewall
2709
2720
})
2710
2721
addBuilder (BuildConfig {
2711
2722
Name : "linux-amd64-perf" ,
0 commit comments