forked from bottlerocket-os/bottlerocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0005-opt-out-of-module-mode-for-builds.patch
73 lines (59 loc) · 2.92 KB
/
0005-opt-out-of-module-mode-for-builds.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
commit 8618c093692f753c0fad1a4ab00912e9f218872a
Author: Jordan Liggitt <liggitt@google.com>
Date: Wed Jun 12 13:52:50 2019 -0400
opt out of module mode for builds
[tjkirch] Backported to Kubernetes 1.15.
diff --git a/hack/jenkins/benchmark-dockerized.sh b/hack/jenkins/benchmark-dockerized.sh
index 9e817a09e39..6c38c0e00cc 100755
--- a/hack/jenkins/benchmark-dockerized.sh
+++ b/hack/jenkins/benchmark-dockerized.sh
@@ -38,6 +38,11 @@ retry() {
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
+# Until all GOPATH references are removed from all build scripts as well,
+# explicitly disable module mode to avoid picking up user-set GO111MODULE preferences.
+# As individual scripts make use of go modules, they can explicitly set GO111MODULE=on
+export GO111MODULE=off
+
go install k8s.io/kubernetes/vendor/github.com/cespare/prettybench
go install k8s.io/kubernetes/vendor/github.com/jstemmer/go-junit-report
diff --git a/hack/jenkins/test-dockerized.sh b/hack/jenkins/test-dockerized.sh
index c1660289750..6f7010a4a0c 100755
--- a/hack/jenkins/test-dockerized.sh
+++ b/hack/jenkins/test-dockerized.sh
@@ -37,6 +37,11 @@ retry() {
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
+# Until all GOPATH references are removed from all build scripts as well,
+# explicitly disable module mode to avoid picking up user-set GO111MODULE preferences.
+# As individual scripts make use of go modules, they can explicitly set GO111MODULE=on
+export GO111MODULE=off
+
go install k8s.io/kubernetes/vendor/github.com/jstemmer/go-junit-report
# Enable the Go race detector.
diff --git a/hack/lib/init.sh b/hack/lib/init.sh
index 42f34567db9..d32a90bb6cf 100755
--- a/hack/lib/init.sh
+++ b/hack/lib/init.sh
@@ -23,10 +23,10 @@ set -o pipefail
unset CDPATH
# Until all GOPATH references are removed from all build scripts as well,
-# explicitly reset to auto mode to avoid picking up user-set GO111MODULE preferences.
+# explicitly disable module mode to avoid picking up user-set GO111MODULE preferences.
# As individual scripts (like hack/update-vendor.sh) make use of go modules,
# they can explicitly set GO111MODULE=on
-export GO111MODULE=auto
+export GO111MODULE=off
# The root of the build/dist directory
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE}")/../.." && pwd -P)"
diff --git a/test/e2e_node/jenkins/e2e-node-jenkins.sh b/test/e2e_node/jenkins/e2e-node-jenkins.sh
index cd2f2e46836..00a8a46db0d 100755
--- a/test/e2e_node/jenkins/e2e-node-jenkins.sh
+++ b/test/e2e_node/jenkins/e2e-node-jenkins.sh
@@ -28,6 +28,11 @@ set -x
. "${1}"
+# Until all GOPATH references are removed from all build scripts as well,
+# explicitly disable module mode to avoid picking up user-set GO111MODULE preferences.
+# As individual scripts make use of go modules, they can explicitly set GO111MODULE=on
+export GO111MODULE=off
+
# indirectly generates test/e2e/generated/bindata.go too
make generated_files