sub_db/.drone.yml
15683069256 c85e76cc26
Some checks failed
continuous-integration/drone/push Build is failing
更新 '.drone.yml'
2022-11-15 16:29:30 +08:00

42 lines
1005 B
YAML

kind: pipeline
type: docker
name: jar-deploy
trigger:
event: [ push ]
branch: [ master ]
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