diff --git a/.drone.yml b/.drone.yml index 48574e7..d8137c7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,68 +1,47 @@ kind: pipeline +type: kubernetes name: default + +node_selector: + physical-node: dev2 + trigger: branch: - - main + - master event: - push workspace: 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: - - name: build master image - image: plugins/docker - commands: - - cd /drone/src/ - - docker build -t $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME} -f Dockerfile . - - docker push $${DOCKER_REGISTRY_URL}/$${IMAGE_NAME} - when: - branch: - - main - volumes: - - name: docker - path: /var/run/docker.sock - - - name: restarting server - image: registry.format.hu/setup:latest - commands: - - cd /services/ - - /scripts/service-exec $${SERVICE_NAME}.containers.$${APP_NAME} stop force - - /scripts/service-exec $${SERVICE_NAME}.containers.$${APP_NAME} start - workspace: - path: /services - when: - branch: - - main - - volumes: - - name: services - path: /services - - name: tmp - path: /services/tmp - - name: docker - 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 + - name: build multiarch from dev + image: docker.io/owncloudci/drone-docker-buildx:4 + privileged: true + settings: + cache-from: [ "registry.dev.format.hu/redis" ] + registry: registry.dev.format.hu + repo: registry.dev.format.hu/redis + tags: latest + dockerfile: Dockerfile + username: + from_secret: dev-hu-registry-username + password: + from_secret: dev-hu-registry-password + platforms: + - linux/amd64 + - linux/arm64 + + - name: pull image to dockerhub + image: docker.io/owncloudci/drone-docker-buildx:4 + privileged: true + settings: + cache-from: [ "safebox/redis" ] + repo: safebox/redis + tags: latest + username: + from_secret: dockerhub-username + password: + from_secret: dockerhub-password + platforms: + - linux/amd64 + - linux/arm64