Merge branch '分库分表' of https://git.echol.cn/15683069256/init into 分库分表

This commit is contained in:
胥员员 2022-11-15 15:48:30 +08:00
commit 15d5b4f07e

42
.drone.yml Normal file
View File

@ -0,0 +1,42 @@
kind: pipeline
type: docker
name: jar-deploy
trigger:
event: [ push ]
branch: [ main ]
steps:
- name: build-package
image: maven:3.8-openjdk-8
volumes:
- name: maven-cache
path: /root/.m2
- name: maven-build
path: /app/build
commands:
- mvn clean package # 应用打包命令
- cp target/scenic-1.0-SNAPSHOT.jar /app/build/scenic-1.0-SNAPSHOT.jar
- cp Dockerfile /app/build/Dockerfile
- cp run.sh /app/build/run.sh
- name: deploy-start
image: appleboy/drone-ssh
settings:
host: 1.116.245.89
username: root
password:
from_secret: ssh_password
port: 22 # 远程连接端口
command_timeout: 5m
script:
- cd /root/docker/maven/build
- chmod +x run.sh
- ./run.sh
# when:
# event:
# - promote
volumes:
- name: maven-build
host:
path: /root/docker/maven/build
- name: maven-cache
host:
path: /root/docker/maven/cache