Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable go modules #4583

Merged
merged 1 commit into from
Sep 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ GOOS = linux

MULTI_ARCH_IMAGE = $(REGISTRY)/nginx-ingress-controller-${ARCH}

# use vendor directory instead of go modules https://github.com/golang/go/wiki/Modules
GO111MODULE=off

export ARCH
export TAG
export PKG
export GOARCH
export GOOS
export GO111MODULE
export GIT_COMMIT
export GOBUILD_FLAGS
export REPO_INFO
Expand Down Expand Up @@ -202,9 +206,9 @@ check_dead_links:

.PHONY: dep-ensure
dep-ensure:
GO111MODULE=on go mod tidy -v
go mod tidy -v
find vendor -name '*_test.go' -delete
GO111MODULE=on go mod vendor
go mod vendor

.PHONY: dev-env
dev-env:
Expand Down
2 changes: 2 additions & 0 deletions build/build-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ if [ "$missing" = true ]; then
fi

export CGO_ENABLED=0
# use vendor directory instead of go modules https://github.com/golang/go/wiki/Modules
export GO111MODULE=off

release=cmd/plugin/release

Expand Down
2 changes: 2 additions & 0 deletions build/cover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ fi

export CGO_ENABLED=1
export GODEBUG=netdns=go+2
# use vendor directory instead of go modules https://github.com/golang/go/wiki/Modules
export GO111MODULE=off

rm -rf coverage.txt
for d in $(go list "${PKG}/..." | grep -v vendor | grep -v '/test/e2e' | grep -v images); do
Expand Down
1 change: 1 addition & 0 deletions build/run-in-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ docker run \
--rm \
${DOCKER_OPTS} \
-e GOCACHE="/go/src/${PKG}/.cache" \
-e GO111MODULE=off \
-v "${HOME}/.kube:${HOME}/.kube" \
-v "${KUBE_ROOT}:/go/src/${PKG}" \
-v "${KUBE_ROOT}/bin/${ARCH}:/go/bin/linux_${ARCH}" \
Expand Down
2 changes: 2 additions & 0 deletions build/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ fi
# enabled to use host dns resolver
export CGO_ENABLED=1
export GODEBUG=netdns=go+2
# use vendor directory instead of go modules https://github.com/golang/go/wiki/Modules
export GO111MODULE=off

go test -v -race \
$(go list "${PKG}/..." | grep -v vendor | grep -v '/test/e2e' | grep -v images | grep -v "docs/examples")