63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: build-and-push
|
|
|
|
steps:
|
|
- name: build-amd64
|
|
image: docker:26
|
|
privileged: true
|
|
environment:
|
|
REGISTRY_URL:
|
|
from_secret: REGISTRY_URL
|
|
volumes:
|
|
- name: docker_sock
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- |
|
|
echo "Building amd64 image..."
|
|
docker buildx create --use
|
|
docker buildx build \
|
|
--platform linux/amd64 \
|
|
-t 192.168.65.130:5000/portainer-agent-tailscale:amd64 \
|
|
--push .
|
|
|
|
- name: build-arm64
|
|
image: docker:26
|
|
privileged: true
|
|
environment:
|
|
REGISTRY_URL:
|
|
from_secret: REGISTRY_URL
|
|
volumes:
|
|
- name: docker_sock
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- |
|
|
echo "Building arm64 image..."
|
|
docker buildx create --use
|
|
docker buildx build \
|
|
--platform linux/arm64 \
|
|
-t 192.168.65.130:5000/portainer-agent-tailscale:arm64 \
|
|
--push .
|
|
|
|
- name: create-manifest
|
|
image: docker:26
|
|
privileged: true
|
|
environment:
|
|
REGISTRY_URL:
|
|
from_secret: REGISTRY_URL
|
|
volumes:
|
|
- name: docker_sock
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- |
|
|
echo "Creating multi-arch manifest..."
|
|
docker manifest create ${REGISTRY_URL}/portainer-agent-tailscale:latest \
|
|
--amend 192.168.65.130:5000/portainer-agent-tailscale:amd64 \
|
|
--amend 192.168.65.130:5000/portainer-agent-tailscale:arm64
|
|
docker manifest push ${REGISTRY_URL}/portainer-agent-tailscale:latest
|
|
|
|
volumes:
|
|
- name: docker_sock
|
|
host:
|
|
path: /var/run/docker.sock
|