diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b5083f1d1e03e0478e5febc623660ee7a06d29d6..1795a5a74ed50582f833baf483bbfc62eb304544 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -519,11 +519,11 @@ clean-images: script: - bash ./.gitlab/remove-unsupported-images.sh -release-images: +release-images-amd64: stage: release image: docker:${DOCKER_VERSION}-dind variables: - BUILDX_BAKE_ARGS: --allow=network.host --load + PLATFORM: linux/amd64 dependencies: - clean-images - test-analyse-service @@ -543,13 +543,8 @@ release-images: - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" - "docker logout ${CI_REGISTRY2_URL}" - "echo ${CI_REGISTRY2_PASSWORD} | docker login --username ${CI_REGISTRY2_USER} --password-stdin ${CI_REGISTRY2_URL}" - - "docker buildx create --name multiarch --driver docker-container --use" script: - - docker buildx build --platform=linux/amd64 --builder=multiarch --output="type=docker,name=dbrepo-core:build" --target build ./lib/java/dbrepo-core - - "docker buildx bake $BUILDX_BAKE_ARGS" - - REPOSITORY_URL=$CI_REGISTRY2_URL make release-images - - docker buildx build --platform=linux/arm64 --builder=multiarch --output="type=docker,name=dbrepo-core:build" --target build ./lib/java/dbrepo-core - - "docker buildx bake $BUILDX_BAKE_ARGS" + - REPOSITORY_URL=$CI_REGISTRY_URL make release-images - REPOSITORY_URL=$CI_REGISTRY2_URL make release-images release-helm: diff --git a/Makefile b/Makefile index 9cea35dc63e1886e3e7e43aa01c1208485434333..abe97f12985f26742d656f5c06087b6588c11d88 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ APP_VERSION ?= 1.8.1 CHART_VERSION ?= 1.8.1 REPOSITORY_URL ?= registry.datalab.tuwien.ac.at/dbrepo +PLATFORM ?= linux/amd64 .PHONY: all all: help diff --git a/make/build.mk b/make/build.mk index 311cdecd97ac8e918d50a5fdfd3b44c9749a28fe..741656ab9cab679e89c4557f8257d5f5aadb4cb6 100644 --- a/make/build.mk +++ b/make/build.mk @@ -2,9 +2,9 @@ .PHONY: build-images build-images: ## Build Docker images. - docker build --network=host -t dbrepo-core:build --target build ./lib/java/dbrepo-core - docker build --network=host -t dbrepo-data-service:build --target build dbrepo-data-service - docker build --network=host -t dbrepo-metadata-service:build --target build dbrepo-metadata-service + docker build --platform=$PLATFORM --network=host -t dbrepo-core:build --target build ./lib/java/dbrepo-core + docker build --platform=$PLATFORM --network=host -t dbrepo-data-service:build --target build dbrepo-data-service + docker build --platform=$PLATFORM --network=host -t dbrepo-metadata-service:build --target build dbrepo-metadata-service docker compose build --parallel .PHONY: build-data-service