use vendor in tests

master
Tim Hockin 2019-03-25 08:07:50 -07:00
parent a50a2f77ac
commit 1b4f73c972
3 changed files with 5 additions and 3 deletions

View File

@ -16,5 +16,7 @@ FROM {ARG_FROM}
ADD bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}
USER nobody:nobody
# This would be nicer as `nobody:nobody` but distroless has no such entries.
USER 65535:65535
ENTRYPOINT ["/{ARG_BIN}"]

View File

@ -36,7 +36,7 @@ ALL_PLATFORMS := linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/s390x
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
BASEIMAGE ?= k8s.gcr.io/debian-base:0.4.1
BASEIMAGE ?= gcr.io/distroless/static
IMAGE := $(REGISTRY)/$(BIN)
TAG := $(VERSION)__$(OS)_$(ARCH)

View File

@ -19,11 +19,11 @@ set -o nounset
set -o pipefail
export CGO_ENABLED=0
export GOFLAGS="-mod=vendor"
TARGETS=$(for d in "$@"; do echo ./$d/...; done)
echo "Running tests:"
go test -i -installsuffix "static" ${TARGETS}
go test -installsuffix "static" ${TARGETS}
echo