File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -749,6 +749,10 @@ func (c *BuildConfig) ModulesEnv(repo string) (env []string) {
749
749
env = append (env , "GO_BUILDER_SET_GOPROXY=coordinator" )
750
750
}
751
751
switch repo {
752
+ case "go" :
753
+ if ! c .OutboundNetworkAllowed () {
754
+ env = append (env , "GOPROXY=off" )
755
+ }
752
756
case "oauth2" , "build" , "website" :
753
757
env = append (env , "GO111MODULE=on" )
754
758
}
@@ -844,6 +848,13 @@ func (c *BuildConfig) IsLongTest() bool {
844
848
return strings .HasSuffix (c .Name , "-longtest" )
845
849
}
846
850
851
+ // OutboundNetworkAllowed reports whether this builder should be
852
+ // allowed to make outbound network requests. This is only enforced
853
+ // on some builders. (Currently most Linux ones)
854
+ func (c * BuildConfig ) OutboundNetworkAllowed () bool {
855
+ return c .Name == "misc-vet-vetall" || c .IsLongTest ()
856
+ }
857
+
847
858
func (c * BuildConfig ) GoInstallRacePackages () []string {
848
859
if c .InstallRacePackages != nil {
849
860
return append ([]string (nil ), c .InstallRacePackages ... )
You can’t perform that action at this time.
0 commit comments