21
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
zpc 2026-04-06 14:20:20 +08:00
parent 7662935368
commit 129e38ec19

View File

@ -0,0 +1,81 @@
---
kind: pipeline
type: docker
name: odf-new
trigger:
branch:
- master
event:
- push
steps:
# ==================== 构建后端 API ====================
- name: build-server
image: plugins/docker
settings:
registry: 192.168.195.25:19900
repo: 192.168.195.25:19900/odf/server
dockerfile: server/ZR.Admin.WebApi/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
image: plugins/docker
settings:
registry: 192.168.195.25:19900
repo: 192.168.195.25:19900/odf/admin
dockerfile: server/ZR.Vue/Dockerfile
context: server/ZR.Vue
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
username:
from_secret: harbor_username
password:
from_secret: harbor_password
insecure: true
# ==================== 构建 H5 Web ====================
- name: build-web
image: plugins/docker
settings:
registry: 192.168.195.25:19900
repo: 192.168.195.25:19900/odf/web
dockerfile: web/Dockerfile
context: web
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
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/odf_new
- docker compose pull
- docker compose up -d
depends_on:
- build-server
- build-admin
- build-web