change registry path + rename drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
71
.drone.yml
Normal file
71
.drone.yml
Normal file
@@ -0,0 +1,71 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build-and-push
|
||||
|
||||
steps:
|
||||
- name: build-amd64
|
||||
image: docker:26
|
||||
privileged: true
|
||||
environment:
|
||||
REGISTRY_URL:
|
||||
from_secret: REGISTRY_URL
|
||||
DOCKER_USER:
|
||||
from_secret: DOCKER_USER
|
||||
DOCKER_PASS:
|
||||
from_secret: DOCKER_PASS
|
||||
volumes:
|
||||
- name: docker_sock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- |
|
||||
echo "=== Building amd64 image ==="
|
||||
docker login "$REGISTRY_URL" -u "$DOCKER_USER" -p "$DOCKER_PASS"
|
||||
docker build -t $REGISTRY_URL/portainer-agent-tailscale:amd64 .
|
||||
docker push $REGISTRY_URL/portainer-agent-tailscale:amd64
|
||||
|
||||
- name: build-arm64
|
||||
image: docker:26
|
||||
privileged: true
|
||||
environment:
|
||||
REGISTRY_URL:
|
||||
from_secret: REGISTRY_URL
|
||||
DOCKER_USER:
|
||||
from_secret: DOCKER_USER
|
||||
DOCKER_PASS:
|
||||
from_secret: DOCKER_PASS
|
||||
volumes:
|
||||
- name: docker_sock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- |
|
||||
echo "=== Building arm64 image ==="
|
||||
docker login "$REGISTRY_URL" -u "$DOCKER_USER" -p "$DOCKER_PASS"
|
||||
docker build -t $REGISTRY_URL/portainer-agent-tailscale:arm64 .
|
||||
docker push $REGISTRY_URL/portainer-agent-tailscale:arm64
|
||||
|
||||
- name: create-manifest
|
||||
image: docker:26
|
||||
privileged: true
|
||||
environment:
|
||||
REGISTRY_URL:
|
||||
from_secret: REGISTRY_URL
|
||||
DOCKER_USER:
|
||||
from_secret: DOCKER_USER
|
||||
DOCKER_PASS:
|
||||
from_secret: DOCKER_PASS
|
||||
volumes:
|
||||
- name: docker_sock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- |
|
||||
echo "=== Creating multi-arch manifest ==="
|
||||
docker login "$REGISTRY_URL" -u "$DOCKER_USER" -p "$DOCKER_PASS"
|
||||
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
|
||||
|
||||
volumes:
|
||||
- name: docker_sock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
Reference in New Issue
Block a user