|
|
|
@ -10,6 +10,22 @@ steps:
|
|
|
|
|
image: maven:3-jdk-10
|
|
|
|
|
commands:
|
|
|
|
|
- mvn install -DskipTests=true
|
|
|
|
|
# 本模板示例为上传软件包和部署脚本到home目录
|
|
|
|
|
# host、username、password可在参数管理中配置
|
|
|
|
|
- name: 上传文件
|
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
|
settings:
|
|
|
|
|
host:
|
|
|
|
|
from_secret: deploy_ip
|
|
|
|
|
username:
|
|
|
|
|
from_secret: deploy_name
|
|
|
|
|
password:
|
|
|
|
|
from_secret: deploy_pwd
|
|
|
|
|
port: 22
|
|
|
|
|
target: /opt/demo
|
|
|
|
|
source:
|
|
|
|
|
- target/*.war
|
|
|
|
|
- Dockerfile
|
|
|
|
|
# 需要将软件包与部署脚本提前上传到远程主机(见文件上传模板)
|
|
|
|
|
# host、username、password可在参数管理中配置
|
|
|
|
|
- name: 远程主机部署
|
|
|
|
|