Use docker to run makefile tasks (#4893)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-01-09 00:58:16 -03:00 committed by GitHub
parent a8c2c9c6bc
commit fcd3a580d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 93 additions and 29 deletions

View file

@ -7,6 +7,7 @@ RUN apk add -U --no-cache \
bash \
curl \
tzdata \
libc6-compat \
openssl
COPY --from=BASE /go/bin/ginkgo /usr/local/bin/

View file

@ -3,9 +3,22 @@ all: container
DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
# Use docker to run makefile tasks
USE_DOCKER ?= true
# Disable run docker tasks if running in prow.
# only checks the existence of the variable, not the value.
ifdef DIND_TASKS
USE_DOCKER=false
endif
.PHONY: container
container:
${DIR}/../../build/run-in-docker.sh make e2e-test-binary
ifeq ($(USE_DOCKER), true)
@${DIR}/../../build/run-in-docker.sh make e2e-test-binary
else
@make -C ${DIR}/../../ e2e-test-binary
endif
cp ../e2e/e2e.test .
cp ../e2e/wait-for-nginx.sh .