mirror of
https://github.com/gravitational/teleport
synced 2024-10-19 16:53:57 +00:00
docker: Override GOMODCACHE to always use a writable location (#6899)
This commit is contained in:
parent
b8f60b921d
commit
1743ea7210
4
Makefile
4
Makefile
|
@ -289,7 +289,7 @@ test-api:
|
|||
test-api: FLAGS ?= '-race'
|
||||
test-api: PACKAGES := $(shell cd api && go list ./...)
|
||||
test-api: $(VERSRC)
|
||||
GOMODCACHE=/tmp go test -tags "$(PAM_TAG) $(FIPS_TAG) $(BPF_TAG)" $(PACKAGES) $(FLAGS) $(ADDFLAGS)
|
||||
go test -tags "$(PAM_TAG) $(FIPS_TAG) $(BPF_TAG)" $(PACKAGES) $(FLAGS) $(ADDFLAGS)
|
||||
|
||||
# Find and run all shell script unit tests (using https://github.com/bats-core/bats-core)
|
||||
.PHONY: test-sh
|
||||
|
@ -341,7 +341,7 @@ lint-go:
|
|||
.PHONY: lint-api
|
||||
lint-api: GO_LINT_API_FLAGS ?=
|
||||
lint-api:
|
||||
cd api && GOMODCACHE=/tmp golangci-lint run -c ../.golangci.yml $(GO_LINT_API_FLAGS)
|
||||
cd api && golangci-lint run -c ../.golangci.yml $(GO_LINT_API_FLAGS)
|
||||
|
||||
# TODO(awly): remove the `--exclude` flag after cleaning up existing scripts
|
||||
.PHONY: lint-sh
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
#
|
||||
HOSTNAME=buildbox
|
||||
SRCDIR=/go/src/github.com/gravitational/teleport
|
||||
DOCKERFLAGS := --rm=true -v "$$(pwd)/../":$(SRCDIR) -v /tmp:/tmp -w $(SRCDIR) -h $(HOSTNAME)
|
||||
GOMODCACHE ?= /tmp/gomodcache
|
||||
DOCKERFLAGS := --rm=true -v "$$(pwd)/../":$(SRCDIR) -v /tmp:/tmp -w $(SRCDIR) -h $(HOSTNAME) -e GOMODCACHE=$(GOMODCACHE)
|
||||
BCCFLAGS := -v "$$(pwd)/bcc:/usr/include/bcc"
|
||||
ADDFLAGS ?=
|
||||
BATSFLAGS :=
|
||||
|
@ -190,6 +191,7 @@ grpc: buildbox
|
|||
clean:
|
||||
docker image rm --force $(BUILDBOX)
|
||||
docker image rm --force $(DOCSBOX)
|
||||
GOMODCACHE=$(GOMODCACHE) go clean -modcache
|
||||
|
||||
#
|
||||
# Runs tests inside a build container
|
||||
|
|
Loading…
Reference in a new issue