Skip to content

Commit be9427e

Browse files
authored
Merge pull request kubernetes#90252 from dims/no-need-to-vendor-bazel-gazelle/buildtools/kazel
Separate go module for tools to avoid polluting root go.mod
2 parents 2c80046 + 6974d32 commit be9427e

File tree

423 files changed

+2315
-114671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

423 files changed

+2315
-114671
lines changed

Godeps/LICENSES

Lines changed: 37 additions & 934 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/root/.kazelcfg.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"SkippedPaths": [
44
"^_.*",
55
"/_",
6+
"^hack/tools",
67
"^third_party/etcd.*"
78
],
89
"AddSourcesRules": true,

build/tools.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,13 @@ limitations under the License.
2020
package tools
2121

2222
import (
23-
_ "github.com/bazelbuild/bazel-gazelle/cmd/gazelle"
24-
_ "github.com/bazelbuild/buildtools/buildozer"
25-
_ "github.com/cespare/prettybench"
26-
_ "github.com/client9/misspell/cmd/misspell"
2723
_ "github.com/go-bindata/go-bindata/go-bindata"
2824
_ "github.com/onsi/ginkgo/ginkgo"
29-
_ "golang.org/x/lint/golint"
30-
_ "gotest.tools"
31-
_ "gotest.tools/gotestsum"
32-
_ "honnef.co/go/tools/cmd/staticcheck"
3325
_ "k8s.io/code-generator/cmd/go-to-protobuf"
3426
_ "k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo"
3527
_ "k8s.io/gengo/examples/deepcopy-gen/generators"
3628
_ "k8s.io/gengo/examples/defaulter-gen/generators"
3729
_ "k8s.io/gengo/examples/import-boss/generators"
3830
_ "k8s.io/gengo/examples/set-gen/generators"
3931
_ "k8s.io/kube-openapi/cmd/openapi-gen"
40-
_ "k8s.io/repo-infra/cmd/kazel"
4132
)

go.mod

Lines changed: 3 additions & 91 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 2 additions & 92 deletions
Large diffs are not rendered by default.

hack/jenkins/benchmark-dockerized.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
4343
# As individual scripts make use of go modules, they can explicitly set GO111MODULE=on
4444
export GO111MODULE=off
4545

46-
go install k8s.io/kubernetes/vendor/github.com/cespare/prettybench
47-
go install k8s.io/kubernetes/vendor/gotest.tools/gotestsum
46+
# Install tools we need
47+
pushd "${KUBE_ROOT}/hack/tools" >/dev/null
48+
GO111MODULE=on go install github.com/cespare/prettybench
49+
GO111MODULE=on go install gotest.tools/gotestsum
50+
popd >/dev/null
4851

4952
# Disable the Go race detector.
5053
export KUBE_RACE=" "

hack/jenkins/test-dockerized.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
4242
# As individual scripts make use of go modules, they can explicitly set GO111MODULE=on
4343
export GO111MODULE=off
4444

45-
go install k8s.io/kubernetes/vendor/gotest.tools/gotestsum
45+
# Install tools we need
46+
pushd "./hack/tools" >/dev/null
47+
GO111MODULE=on go install gotest.tools/gotestsum
48+
popd >/dev/null
4649

4750
# Enable the Go race detector.
4851
export KUBE_RACE=-race

hack/make-rules/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ produceJUnitXMLReport() {
225225
junit_xml_filename="${junit_filename_prefix}.xml"
226226

227227
if ! command -v gotestsum >/dev/null 2>&1; then
228-
kube::log::error "gotestsum not found; please install with " \
229-
"GO111MODULE=off go install k8s.io/kubernetes/vendor/gotest.tools/gotestsum"
228+
kube::log::error "gotestsum not found; please cd to hack/tools and install with " \
229+
"GO111MODULE=on go install gotest.tools/gotestsum"
230230
return
231231
fi
232232
gotestsum --junitfile "${junit_xml_filename}" --raw-command cat "${junit_filename_prefix}"*.stdout

hack/make-rules/vet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if [[ ${#targets[@]} -eq 0 ]]; then
4949
# Do not run on third_party directories or generated client code or build tools.
5050
while IFS='' read -r line; do
5151
targets+=("${line}")
52-
done < <(go list -e ./... | grep -E -v "/(build|third_party|vendor|staging|clientset_generated)/")
52+
done < <(go list -e ./... | grep -E -v "/(build|third_party|vendor|staging|clientset_generated|hack)/")
5353
fi
5454

5555
go vet "${goflags[@]:+${goflags[@]}}" "${targets[@]}"

hack/tools/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor/

0 commit comments

Comments
 (0)