xiangyixiangqin/.drone.yml
zpc b63139b5ae
All checks were successful
continuous-integration/drone/push Build is passing
21
2026-03-29 22:05:51 +08:00

80 lines
1.8 KiB
YAML

---
kind: pipeline
type: docker
name: xiangyixiangqin
trigger:
branch:
- master
event:
- push
steps:
- name: build-admin-api
image: plugins/docker
settings:
registry: 192.168.195.25:19900
repo: 192.168.195.25:19900/xiangyixiangqin/admin-api
dockerfile: server/src/XiangYi.AdminApi/Dockerfile
context: server
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
username:
from_secret: harbor_username
password:
from_secret: harbor_password
insecure: true
- name: build-app-api
image: plugins/docker
settings:
registry: 192.168.195.25:19900
repo: 192.168.195.25:19900/xiangyixiangqin/app-api
dockerfile: server/src/XiangYi.AppApi/Dockerfile
context: server
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
username:
from_secret: harbor_username
password:
from_secret: harbor_password
insecure: true
- name: build-admin-web
image: plugins/docker
settings:
registry: 192.168.195.25:19900
repo: 192.168.195.25:19900/xiangyixiangqin/admin-web
dockerfile: admin/Dockerfile
context: admin
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
cache_from:
- 192.168.195.25:19900/xiangyixiangqin/admin-web:latest
username:
from_secret: harbor_username
password:
from_secret: harbor_password
insecure: true
- name: deploy
image: appleboy/drone-ssh
settings:
host: 192.168.195.15
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port: 22
script:
- cd /disk/docker-compose/xiangyixiangqin
- docker compose pull
- docker compose up -d
depends_on:
- build-admin-api
- build-app-api
- build-admin-web