Files
photos/.drone.yml
T
2024-04-17 22:54:13 +02:00

86 lines
1.8 KiB
YAML
Executable File

kind: pipeline
type: docker
name: build_publish
steps:
- name: photos-client
image: node:21.2.0
commands:
- cd client
- npm ci
- npm run build
- echo "latest,${DRONE_BUILD_NUMBER}" > .tags
- name: photos-admin-client
image: node:21.2.0
commands:
- cd admin-client
- npm ci
- npm run build
- echo "latest,${DRONE_BUILD_NUMBER}" > .tags
- name: server
image: node:21.2.0
commands:
- cd server
- npm ci
- npm run build
- echo "latest,${DRONE_BUILD_NUMBER}" > .tags
- name: publish-api
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry-api.novox.be/novox/photos-server
registry: registry-api.novox.be
context: ./server
dockerfile: ./server/Dockerfile
depends_on:
- server
- name: publish-photos-client
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry-api.novox.be/novox/photos-client
registry: registry-api.novox.be
context: ./client
dockerfile: ./client/Dockerfile
depends_on:
- photos-client
- name: publish-photos-admin-client
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: registry-api.novox.be/novox/photos-admin-client
registry: registry-api.novox.be
context: ./admin-client
dockerfile: ./admin-client/Dockerfile
depends_on:
- photos-admin-client
trigger:
branch:
- master
---
kind: pipeline
type: exec
name: deploy
steps:
- name: deploy
commands:
- systemctl restart dc@photos.novox.be
depends_on:
- build_publish