From 9e35f4b7158566dbf3a971ec381953074f8ec792 Mon Sep 17 00:00:00 2001 From: Patrick Gniza Date: Mon, 3 Nov 2025 20:49:24 +0100 Subject: [PATCH] update drone.yml --- drone.yml | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/drone.yml b/drone.yml index 858ffb6..ba29745 100644 --- a/drone.yml +++ b/drone.yml @@ -3,32 +3,30 @@ type: docker name: build-and-push-multiarch steps: - - - name: check-docker + - name: setup-builder image: docker:26 privileged: true volumes: - name: docker_sock path: /var/run/docker.sock commands: - - docker info + - docker buildx create --name multiarch --use + - docker buildx inspect --bootstrap - name: build-amd64 image: docker:26 privileged: true - environment: - HARBOR_USER: - from_secret: harbor_user - HARBOR_PASS: - from_secret: harbor_pass - REGISTRY_URL: - from_secret: REGISTRY_URL volumes: - name: docker_sock path: /var/run/docker.sock + environment: + REGISTRY_URL: + from_secret: REGISTRY_URL commands: - - docker buildx create --use - - docker buildx build \ + - | + echo "Building amd64 image..." + docker buildx use multiarch + docker buildx build \ --platform linux/amd64 \ -t ${REGISTRY_URL}/portainer-agent-tailscale:amd64 \ --push . @@ -36,38 +34,39 @@ steps: - name: build-arm64 image: docker:26 privileged: true - environment: - HARBOR_USER: - from_secret: harbor_user - HARBOR_PASS: - from_secret: harbor_pass volumes: - name: docker_sock path: /var/run/docker.sock + environment: + REGISTRY_URL: + from_secret: REGISTRY_URL commands: - - docker buildx create --use - - docker buildx build \ + - | + echo "Building arm64 image..." + docker buildx use multiarch + docker buildx build \ --platform linux/arm64 \ -t ${REGISTRY_URL}/portainer-agent-tailscale:arm64 \ --push . - name: create-manifest image: docker:26 - environment: - HARBOR_USER: - from_secret: harbor_user - HARBOR_PASS: - from_secret: harbor_pass + privileged: true volumes: - name: docker_sock path: /var/run/docker.sock + environment: + REGISTRY_URL: + from_secret: REGISTRY_URL commands: - - docker manifest create ${REGISTRY_URL}/portainer-agent-tailscale:latest \ + - | + echo "Creating and pushing multi-arch manifest..." + docker manifest create ${REGISTRY_URL}/portainer-agent-tailscale:latest \ --amend ${REGISTRY_URL}/portainer-agent-tailscale:amd64 \ --amend ${REGISTRY_URL}/portainer-agent-tailscale:arm64 - - docker manifest push ${REGISTRY_URL}/portainer-agent-tailscale:latest + docker manifest push ${REGISTRY_URL}/portainer-agent-tailscale:latest volumes: - name: docker_sock host: - path: /var/run/docker.sock \ No newline at end of file + path: /var/run/docker.sock