@@ -13,9 +13,7 @@ DOCKER_CLI_GO_BUILD_CACHE ?= y
1313COMPANY_NAME ?=
1414
1515DEV_DOCKER_IMAGE_NAME = docker-cli-dev$(IMAGE_TAG )
16- BINARY_NATIVE_IMAGE_NAME = docker-cli-native$(IMAGE_TAG )
17- CROSS_IMAGE_NAME = docker-cli-cross$(IMAGE_TAG )
18- E2E_IMAGE_NAME = docker-cli-e2e$(IMAGE_TAG )
16+ E2E_IMAGE_NAME = docker-cli-e2e
1917E2E_ENGINE_VERSION ?=
2018CACHE_VOLUME_NAME := docker-cli-dev-cache
2119ifeq ($(DOCKER_CLI_GO_BUILD_CACHE ) ,y)
@@ -33,15 +31,6 @@ build_docker_image:
3331 # build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
3432 cat ./dockerfiles/Dockerfile.dev | docker build ${DOCKER_BUILD_ARGS} --build-arg=GO_VERSION -t $(DEV_DOCKER_IMAGE_NAME ) -
3533
36- .PHONY : build_binary_native_image
37- build_binary_native_image :
38- # build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
39- cat ./dockerfiles/Dockerfile.binary-native | docker build --build-arg=GO_VERSION -t $(BINARY_NATIVE_IMAGE_NAME ) -
40-
41- .PHONY : build_e2e_image
42- build_e2e_image :
43- docker build -t $(E2E_IMAGE_NAME ) --build-arg=GO_VERSION --build-arg VERSION=$(VERSION ) --build-arg GITCOMMIT=$(GITCOMMIT ) -f ./dockerfiles/Dockerfile.e2e .
44-
4534DOCKER_RUN_NAME_OPTION := $(if $(DOCKER_CLI_CONTAINER_NAME ) ,--name $(DOCKER_CLI_CONTAINER_NAME ) ,)
4635DOCKER_RUN := docker run --rm $(ENVVARS ) $(DOCKER_CLI_MOUNTS ) $(DOCKER_RUN_NAME_OPTION )
4736
@@ -51,8 +40,11 @@ binary:
5140
5241build : binary # # alias for binary
5342
54- plugins : build_binary_native_image # # build the CLI plugin examples
55- $(DOCKER_RUN ) $(BINARY_NATIVE_IMAGE_NAME ) ./scripts/build/plugins
43+ plugins : # # build the CLI plugin examples
44+ docker buildx bake plugins
45+
46+ plugins-cross : # # build the CLI plugin examples for all platforms
47+ docker buildx bake plugins-cross
5648
5749.PHONY : clean
5850clean : build_docker_image # # clean build artifacts
@@ -70,14 +62,6 @@ test: test-unit test-e2e
7062cross :
7163 COMPANY_NAME=$(COMPANY_NAME ) docker buildx bake cross
7264
73- .PHONY : plugins-windows
74- plugins-windows : build_cross_image # # build the example CLI plugins for Windows
75- $(DOCKER_RUN ) $(CROSS_IMAGE_NAME ) make $@
76-
77- .PHONY : plugins-osx
78- plugins-osx : build_cross_image # # build the example CLI plugins for macOS
79- $(DOCKER_RUN ) $(CROSS_IMAGE_NAME ) make $@
80-
8165.PHONY : dynbinary
8266dynbinary : # # build dynamically linked binary
8367 USE_GLIBC=1 COMPANY_NAME=$(COMPANY_NAME ) docker buildx bake dynbinary
@@ -118,20 +102,24 @@ manpages: build_docker_image ## generate man pages from go source and markdown
118102yamldocs : build_docker_image # # generate documentation YAML files consumed by docs repo
119103 $(DOCKER_RUN ) -it $(DEV_DOCKER_IMAGE_NAME ) make yamldocs
120104
105+ .PHONY : build-e2e-image
106+ build-e2e-image :
107+ IMAGE_NAME=$(E2E_IMAGE_NAME ) VERSION=$(VERSION ) docker buildx bake e2e-image
108+
121109.PHONY : test-e2e
122110test-e2e : test-e2e-non-experimental test-e2e-experimental test-e2e-connhelper-ssh # # run all e2e tests
123111
124112.PHONY : test-e2e-experimental
125- test-e2e-experimental : build_e2e_image # run experimental e2e tests
126- docker run --rm --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock $(ENVVARS ) -e DOCKERD_EXPERIMENTAL=1 $(E2E_IMAGE_NAME )
113+ test-e2e-experimental : build-e2e-image # run experimental e2e tests
114+ docker run --rm --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock $(ENVVARS ) -e DOCKERD_EXPERIMENTAL=1 -e TEST_ENGINE_VERSION= $( E2E_ENGINE_VERSION ) $(E2E_IMAGE_NAME )
127115
128116.PHONY : test-e2e-non-experimental
129- test-e2e-non-experimental : build_e2e_image # run non-experimental e2e tests
117+ test-e2e-non-experimental : build-e2e-image # run non-experimental e2e tests
130118 docker run --rm --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock $(ENVVARS ) -e TEST_ENGINE_VERSION=$(E2E_ENGINE_VERSION ) $(E2E_IMAGE_NAME )
131119
132120.PHONY : test-e2e-connhelper-ssh
133- test-e2e-connhelper-ssh : build_e2e_image # run experimental SSH-connection helper e2e tests
134- docker run --rm --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock $(ENVVARS ) -e DOCKERD_EXPERIMENTAL=1 -e TEST_CONNHELPER=ssh $(E2E_IMAGE_NAME )
121+ test-e2e-connhelper-ssh : build-e2e-image # run experimental SSH-connection helper e2e tests
122+ docker run --rm --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock $(ENVVARS ) -e DOCKERD_EXPERIMENTAL=1 -e TEST_ENGINE_VERSION= $( E2E_ENGINE_VERSION ) -e TEST_CONNHELPER=ssh $(E2E_IMAGE_NAME )
135123
136124.PHONY : help
137125help : # # print this help
0 commit comments