From 15d6565e49f8bdfc589ff0e0884059a9d790cdc5 Mon Sep 17 00:00:00 2001 From: Silvin Lubecki Date: Tue, 19 May 2020 18:38:19 +0200 Subject: [PATCH] Add a new Makefile variable to override DockerInDocker engine version we use to run e2e tests Signed-off-by: Silvin Lubecki --- docker.Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker.Makefile b/docker.Makefile index 827dac5954..7ff6b02d02 100644 --- a/docker.Makefile +++ b/docker.Makefile @@ -16,12 +16,13 @@ LINTER_IMAGE_NAME = docker-cli-lint$(IMAGE_TAG) CROSS_IMAGE_NAME = docker-cli-cross$(IMAGE_TAG) VALIDATE_IMAGE_NAME = docker-cli-shell-validate$(IMAGE_TAG) E2E_IMAGE_NAME = docker-cli-e2e$(IMAGE_TAG) +E2E_ENGINE_VERSION ?= CACHE_VOLUME_NAME := docker-cli-dev-cache ifeq ($(DOCKER_CLI_GO_BUILD_CACHE),y) DOCKER_CLI_MOUNTS += -v "$(CACHE_VOLUME_NAME):/root/.cache/go-build" endif VERSION = $(shell cat VERSION) -ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM -e TESTFLAGS -e TESTDIRS -e GOOS -e GOARCH -e GOARM +ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT -e PLATFORM -e TESTFLAGS -e TESTDIRS -e GOOS -e GOARCH -e GOARM -e TEST_ENGINE_VERSION=$(E2E_ENGINE_VERSION) # build docker image (dockerfiles/Dockerfile.build) .PHONY: build_docker_image @@ -149,7 +150,7 @@ test-e2e-experimental: build_e2e_image # run experimental e2e tests .PHONY: test-e2e-non-experimental test-e2e-non-experimental: build_e2e_image # run non-experimental e2e tests - docker run --rm -v /var/run/docker.sock:/var/run/docker.sock $(ENVVARS) $(E2E_IMAGE_NAME) + docker run --rm -v /var/run/docker.sock:/var/run/docker.sock $(ENVVARS) -e TEST_ENGINE_VERSION=$(E2E_ENGINE_VERSION) $(E2E_IMAGE_NAME) .PHONY: test-e2e-connhelper-ssh test-e2e-connhelper-ssh: build_e2e_image # run experimental SSH-connection helper e2e tests