From 097888f57707784f97e13c10a4986d68527c866e Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Thu, 26 Oct 2023 10:30:46 +1100 Subject: [PATCH 1/2] ensure to use default builder --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index faeff78bb..31ea27e73 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,6 +36,7 @@ node ('lagoon-images') { sh script: "make docker-buildx-remove", label: "removing leftover buildx" sh script: "docker image prune -af", label: "Pruning images" sh script: "docker buildx prune -af", label: "Pruning builder cache" + sh script: "docker buildx use default", label: "Ensure to use default builder" } } From 5063b7fdbd54257beacbc8babbd51158ed0636fa Mon Sep 17 00:00:00 2001 From: Toby Bellwood Date: Fri, 27 Oct 2023 09:55:46 +1100 Subject: [PATCH 2/2] use default builder --- Jenkinsfile | 2 +- Makefile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 31ea27e73..5120d0569 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,6 @@ node ('lagoon-images') { sh script: "make docker-buildx-remove", label: "removing leftover buildx" sh script: "docker image prune -af", label: "Pruning images" sh script: "docker buildx prune -af", label: "Pruning builder cache" - sh script: "docker buildx use default", label: "Ensure to use default builder" } } @@ -96,6 +95,7 @@ node ('lagoon-images') { 'Run all the tests on the local images': { stage ('running test suite') { dir ('tests') { + sh script: "docker buildx use default", label: "Ensure to use default builder" sh script: "grep -rl uselagoon . | xargs sed -i '/^FROM/ s/uselagoon/${CI_BUILD_TAG}/'" sh script: "grep -rl uselagoon . | xargs sed -i '/image: uselagoon/ s/uselagoon/${CI_BUILD_TAG}/'" sh script: "find . -maxdepth 2 -name docker-compose.yml | xargs sed -i -e '/###/d'" diff --git a/Makefile b/Makefile index df3f0232b..45ede4974 100644 --- a/Makefile +++ b/Makefile @@ -78,6 +78,7 @@ docker_build_local = DOCKER_BUILDKIT=1 docker build $(DOCKER_BUILD_PARAMS) \ -f $(2) $(3) docker_buildx_two = docker buildx build $(DOCKER_BUILD_PARAMS) \ + --builder ci-local \ --platform linux/amd64,linux/arm64/v8 \ --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg LAGOON_VERSION=$(LAGOON_VERSION) \ @@ -91,6 +92,7 @@ docker_buildx_two = docker buildx build $(DOCKER_BUILD_PARAMS) \ -f $(2) $(3) docker_buildx_three = docker buildx build $(DOCKER_BUILD_PARAMS) \ + --builder ci-local \ --platform linux/amd64,linux/arm64/v8 \ --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg LAGOON_VERSION=$(LAGOON_VERSION) \ @@ -354,7 +356,7 @@ scan-images: .PHONY: docker-buildx-configure docker-buildx-configure: docker run -d -p 5000:5000 --restart always --name registry registry:2 - docker buildx create --platform linux/arm64,linux/arm/v8 --driver-opt network=host --name ci-local --use + docker buildx create --platform linux/arm64,linux/arm/v8 --driver-opt network=host --name ci-local docker buildx ls docker context ls