Skip to content

Commit

Permalink
Merge pull request #858 from uselagoon/testing/buildx
Browse files Browse the repository at this point in the history
use default builder for docker compose tests
  • Loading branch information
tobybellwood authored Oct 26, 2023
2 parents 75f8398 + 5063b7f commit 5b51502
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,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'"
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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) \
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5b51502

Please sign in to comment.