Fix make -f docker.Makefile without buildkit enabled

Commit 01cd748eb6 started using
Dockerfile features that are currently only supported with
buildkit enabled.

While we enabled buildkit in our Jenkinsfile, the makefile
did not do the same, causing some targets to fail if buildkit
was not enabled.

This patch updates the makefile to enable buildkit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-09-24 13:01:42 +02:00
parent db411c35e6
commit 7ecf320e1b
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 7 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -18,7 +18,7 @@ pipeline {
steps {
sh "E2E_UNIQUE_ID=clie2e${BUILD_NUMBER} \
IMAGE_TAG=clie2e${BUILD_NUMBER} \
DOCKER_BUILDKIT=1 make -f docker.Makefile test-e2e-non-experimental"
make -f docker.Makefile test-e2e-non-experimental"
}
}
stage("e2e (non-experimental) - 18.09 engine") {
@ -26,21 +26,21 @@ pipeline {
sh "E2E_ENGINE_VERSION=18.09-dind \
E2E_UNIQUE_ID=clie2e${BUILD_NUMBER} \
IMAGE_TAG=clie2e${BUILD_NUMBER} \
DOCKER_BUILDKIT=1 make -f docker.Makefile test-e2e-non-experimental"
make -f docker.Makefile test-e2e-non-experimental"
}
}
stage("e2e (experimental)") {
steps {
sh "E2E_UNIQUE_ID=clie2e${BUILD_NUMBER} \
IMAGE_TAG=clie2e${BUILD_NUMBER} \
DOCKER_BUILDKIT=1 make -f docker.Makefile test-e2e-experimental"
make -f docker.Makefile test-e2e-experimental"
}
}
stage("e2e (ssh connhelper)") {
steps {
sh "E2E_UNIQUE_ID=clie2e${BUILD_NUMBER} \
IMAGE_TAG=clie2e${BUILD_NUMBER} \
DOCKER_BUILDKIT=1 make -f docker.Makefile test-e2e-connhelper-ssh"
make -f docker.Makefile test-e2e-connhelper-ssh"
}
}
}

View File

@ -23,6 +23,9 @@ endif
VERSION = $(shell cat VERSION)
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)
# Some Dockerfiles use features that are only supported with BuildKit enabled
export DOCKER_BUILDKIT=1
# build docker image (dockerfiles/Dockerfile.build)
.PHONY: build_docker_image
build_docker_image: