50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: build-and-push-multiarch
|
|
|
|
steps:
|
|
- 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
|
|
commands:
|
|
- docker buildx create --use
|
|
- docker buildx build \
|
|
--platform linux/amd64 \
|
|
-t ${REGISTRY_URL}/portainer-agent-tailscale:amd64 \
|
|
--push .
|
|
|
|
- name: build-arm64
|
|
image: docker:26
|
|
privileged: true
|
|
environment:
|
|
HARBOR_USER:
|
|
from_secret: harbor_user
|
|
HARBOR_PASS:
|
|
from_secret: harbor_pass
|
|
commands:
|
|
- docker buildx create --use
|
|
- 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
|
|
commands:
|
|
- 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
|