From 89a30e9a419f3cb4f2f21f23af16d5e5e7962d91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mr=C3=A1zek?= Date: Tue, 12 Nov 2024 19:15:17 +0100 Subject: [PATCH] fixup! fixup! .gitlab-ci.yml: docker: added cross-platform build and deploy --- .gitlab-ci.yml | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd2364457..9fcaf70a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -207,22 +207,20 @@ build:macOS: - amd64 - dind -# docker:build: -# <<: *docker -# <<: *multi_platform -# stage: build -# variables: -# DOCKER_IMAGE_NAME: knot-resolver:${PLATFORM} -# script: -# - docker buildx build --no-cache -t ${DOCKER_IMAGE_NAME} . -# after_script: -# - docker rmi ${DOCKER_IMAGE_NAME} -# - docker rmi $(docker images -f "dangling=true" -q) -# tags: -# - ${PLATFORM} -# - dind - -docker:build: +docker:build:native: + <<: *docker + <<: *multi_platform + stage: build + script: + - docker buildx build --no-cache -t knot-resolver:${PLATFORM} . + after_script: + - docker rmi knot-resolver:${PLATFORM} + - docker rmi $(docker images -f "dangling=true" -q) + tags: + - ${PLATFORM} + - dind + +docker:build:cross-platform: <<: *docker stage: build # only: @@ -249,11 +247,18 @@ docker:build: docker:test: <<: *docker <<: *multi_platform - needs: - - docker:build + image: debian:12-slim + # needs: + # - docker:build:native + # - docker:build:cross-platform + services: + - name: ${GITLAB_REGISTRY}:${CI_COMMIT_REF_NAME} + alias: knot-resolver + before_script: + - apt-get -y install knot-dnsutils script: - - exit 0 - + - kdig nic.cz @knot-resolver + docker:deploy: <<: *docker stage: deploy