This commit is contained in:
51
drone.yml
Normal file
51
drone.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
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
|
||||
commands:
|
||||
- docker login harbor.example.com -u "$HARBOR_USER" -p "$HARBOR_PASS"
|
||||
- docker buildx create --use
|
||||
- docker buildx build \
|
||||
--platform linux/amd64 \
|
||||
-t harbor.example.com/myproj/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 login harbor.example.com -u "$HARBOR_USER" -p "$HARBOR_PASS"
|
||||
- docker buildx create --use
|
||||
- docker buildx build \
|
||||
--platform linux/arm64 \
|
||||
-t harbor.example.com/myproj/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 login harbor.example.com -u "$HARBOR_USER" -p "$HARBOR_PASS"
|
||||
- docker manifest create harbor.example.com/myproj/portainer-agent-tailscale:latest \
|
||||
--amend harbor.example.com/myproj/portainer-agent-tailscale:amd64 \
|
||||
--amend harbor.example.com/myproj/portainer-agent-tailscale:arm64
|
||||
- docker manifest push harbor.example.com/myproj/portainer-agent-tailscale:latest
|
||||
|
||||
Reference in New Issue
Block a user