update drone.yml
This commit is contained in:
36
drone.yml
36
drone.yml
@@ -1,31 +1,21 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: build-and-push-multiarch
|
name: build-and-push
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: setup-builder
|
|
||||||
image: docker:26
|
|
||||||
privileged: true
|
|
||||||
volumes:
|
|
||||||
- name: docker_sock
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
commands:
|
|
||||||
- docker buildx create --name multiarch --use
|
|
||||||
- docker buildx inspect --bootstrap
|
|
||||||
|
|
||||||
- name: build-amd64
|
- name: build-amd64
|
||||||
image: docker:26
|
image: docker:26
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
|
||||||
- name: docker_sock
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
environment:
|
environment:
|
||||||
REGISTRY_URL:
|
REGISTRY_URL:
|
||||||
from_secret: REGISTRY_URL
|
from_secret: REGISTRY_URL
|
||||||
|
volumes:
|
||||||
|
- name: docker_sock
|
||||||
|
path: /var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
echo "Building amd64 image..."
|
echo "Building amd64 image..."
|
||||||
docker buildx use multiarch
|
docker buildx create --use
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/amd64 \
|
--platform linux/amd64 \
|
||||||
-t ${REGISTRY_URL}/portainer-agent-tailscale:amd64 \
|
-t ${REGISTRY_URL}/portainer-agent-tailscale:amd64 \
|
||||||
@@ -34,16 +24,16 @@ steps:
|
|||||||
- name: build-arm64
|
- name: build-arm64
|
||||||
image: docker:26
|
image: docker:26
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
|
||||||
- name: docker_sock
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
environment:
|
environment:
|
||||||
REGISTRY_URL:
|
REGISTRY_URL:
|
||||||
from_secret: REGISTRY_URL
|
from_secret: REGISTRY_URL
|
||||||
|
volumes:
|
||||||
|
- name: docker_sock
|
||||||
|
path: /var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
echo "Building arm64 image..."
|
echo "Building arm64 image..."
|
||||||
docker buildx use multiarch
|
docker buildx create --use
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/arm64 \
|
--platform linux/arm64 \
|
||||||
-t ${REGISTRY_URL}/portainer-agent-tailscale:arm64 \
|
-t ${REGISTRY_URL}/portainer-agent-tailscale:arm64 \
|
||||||
@@ -52,15 +42,15 @@ steps:
|
|||||||
- name: create-manifest
|
- name: create-manifest
|
||||||
image: docker:26
|
image: docker:26
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
|
||||||
- name: docker_sock
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
environment:
|
environment:
|
||||||
REGISTRY_URL:
|
REGISTRY_URL:
|
||||||
from_secret: REGISTRY_URL
|
from_secret: REGISTRY_URL
|
||||||
|
volumes:
|
||||||
|
- name: docker_sock
|
||||||
|
path: /var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
echo "Creating and pushing multi-arch manifest..."
|
echo "Creating multi-arch manifest..."
|
||||||
docker manifest create ${REGISTRY_URL}/portainer-agent-tailscale:latest \
|
docker manifest create ${REGISTRY_URL}/portainer-agent-tailscale:latest \
|
||||||
--amend ${REGISTRY_URL}/portainer-agent-tailscale:amd64 \
|
--amend ${REGISTRY_URL}/portainer-agent-tailscale:amd64 \
|
||||||
--amend ${REGISTRY_URL}/portainer-agent-tailscale:arm64
|
--amend ${REGISTRY_URL}/portainer-agent-tailscale:arm64
|
||||||
|
|||||||
Reference in New Issue
Block a user