Use docker to run makefile tasks (#4893)
This commit is contained in:
parent
a8c2c9c6bc
commit
fcd3a580d9
5 changed files with 93 additions and 29 deletions
|
|
@ -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/
|
||||
|
|
|
|||
|
|
@ -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 .
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue