update to multiarch
This commit is contained in:
95
.drone.yml
95
.drone.yml
@@ -1,68 +1,47 @@
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
|
node_selector:
|
||||||
|
physical-node: dev2
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- master
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
workspace:
|
workspace:
|
||||||
path: /drone/src
|
path: /drone/src
|
||||||
environment:
|
|
||||||
REPO_NAME: redis
|
|
||||||
IMAGE_NAME: redis
|
|
||||||
APP_NAME: safebox-redis
|
|
||||||
SERVICE_NAME: service-demo
|
|
||||||
DOCKER_REGISTRY_URL: registry.format.hu
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build master image
|
- name: build multiarch from dev
|
||||||
image: plugins/docker
|
image: docker.io/owncloudci/drone-docker-buildx:4
|
||||||
commands:
|
privileged: true
|
||||||
- cd /drone/src/
|
settings:
|
||||||
- docker build -t $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME} -f Dockerfile .
|
cache-from: [ "registry.dev.format.hu/redis" ]
|
||||||
- docker push $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME}
|
registry: registry.dev.format.hu
|
||||||
when:
|
repo: registry.dev.format.hu/redis
|
||||||
branch:
|
tags: latest
|
||||||
- main
|
dockerfile: Dockerfile
|
||||||
volumes:
|
username:
|
||||||
- name: docker
|
from_secret: dev-hu-registry-username
|
||||||
path: /var/run/docker.sock
|
password:
|
||||||
|
from_secret: dev-hu-registry-password
|
||||||
- name: restarting server
|
platforms:
|
||||||
image: registry.format.hu/setup:latest
|
- linux/amd64
|
||||||
commands:
|
- linux/arm64
|
||||||
- cd /services/
|
|
||||||
- /scripts/service-exec $${SERVICE_NAME}.containers.$${APP_NAME} stop force
|
- name: pull image to dockerhub
|
||||||
- /scripts/service-exec $${SERVICE_NAME}.containers.$${APP_NAME} start
|
image: docker.io/owncloudci/drone-docker-buildx:4
|
||||||
workspace:
|
privileged: true
|
||||||
path: /services
|
settings:
|
||||||
when:
|
cache-from: [ "safebox/redis" ]
|
||||||
branch:
|
repo: safebox/redis
|
||||||
- main
|
tags: latest
|
||||||
|
username:
|
||||||
volumes:
|
from_secret: dockerhub-username
|
||||||
- name: services
|
password:
|
||||||
path: /services
|
from_secret: dockerhub-password
|
||||||
- name: tmp
|
platforms:
|
||||||
path: /services/tmp
|
- linux/amd64
|
||||||
- name: docker
|
- linux/arm64
|
||||||
path: /var/run/docker.sock
|
|
||||||
- name: docker_bin
|
|
||||||
path: /usr/bin/docker
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: docker
|
|
||||||
host:
|
|
||||||
path: /var/run/docker.sock
|
|
||||||
|
|
||||||
- name: docker_bin
|
|
||||||
host:
|
|
||||||
path: /usr/bin/docker
|
|
||||||
|
|
||||||
- name: services
|
|
||||||
host:
|
|
||||||
path: /etc/user/config/services
|
|
||||||
|
|
||||||
- name: tmp
|
|
||||||
host:
|
|
||||||
path: /etc/user/config/services/tmp
|
|
||||||
|
Reference in New Issue
Block a user