Update .drone.yml

This commit is contained in:
2025-03-04 07:20:11 +00:00
parent 558e9a5d41
commit b3c6381626

View File

@@ -1,5 +1,10 @@
kind: pipeline kind: pipeline
type: kubernetes
name: default name: default
node_selector:
physical-node: dev2
trigger: trigger:
branch: branch:
- main - main
@@ -8,42 +13,33 @@ trigger:
workspace: workspace:
path: /drone/src path: /drone/src
environment:
REPO_NAME: web-installer
IMAGE_NAME: web-installer
REGISTRY_SERVER_NAME: registry.format.hu
DOCKER_REGISTRY_URL: registry.format.hu
steps: steps:
- name: build image - name: build multiarch from dev
image: plugins/docker image: docker.io/owncloudci/drone-docker-buildx:4
commands: privileged: true
- cd /drone/src/ settings:
- export DOCKER_CLI_EXPERIMENTAL=enabled registry: registry.dev.format.hu
repo: registry.dev.format.hu/web-installer
tags: latest
dockerfile: Dockerfile
username:
from_secret: dev-hu-registry-username
password:
from_secret: dev-hu-registry-password
platforms:
- linux/amd64
- linux/arm64
- docker build --platform linux/amd64 --build-arg BUILDPLATFORM=linux/amd64 --tag $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}/amd64 -f Dockerfile . - name: pull image to dockerhub
- docker build --platform linux/arm64 --build-arg BUILDPLATFORM=linux/arm64 --tag $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}/arm64 -f Dockerfile . image: docker.io/owncloudci/drone-docker-buildx:4
privileged: true
- docker push $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}/amd64 settings:
- docker push $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}/arm64 repo: safebox/web-installer
tags: latest
- | username:
docker manifest create $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME} \ from_secret: dockerhub-username
$${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}/amd64 \ password:
$${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}/arm64 from_secret: dockerhub-password
platforms:
- docker manifest annotate --arch arm64 --variant v8 $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME} $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}/arm64 - linux/amd64
- docker manifest annotate --arch amd64 $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME} $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}/amd64 - linux/arm64
- docker manifest push $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}
when:
branch:
- main
volumes:
- name: docker
path: /var/run/docker.sock
volumes:
- name: docker
host:
path: /var/run/docker.sock