|
|
@@ -21,7 +21,7 @@ clone:
|
|
|
steps:
|
|
|
- name: build-project
|
|
|
image: maven:3.9.4-amazoncorretto-17
|
|
|
- pull: always
|
|
|
+ pull: if-not-exists
|
|
|
depends_on: [clone] # 依赖的步骤
|
|
|
volumes: # 挂载数据卷
|
|
|
- name: mvn_repo # 数据卷名称
|
|
|
@@ -38,14 +38,18 @@ steps:
|
|
|
- success # 当前步骤成功时执行
|
|
|
- name: scp-project
|
|
|
image: appleboy/drone-scp
|
|
|
+ pull: if-not-exists
|
|
|
depends_on: [build-project] # 依赖的步骤
|
|
|
volumes: # 挂载数据卷
|
|
|
- name: targetDir # 数据卷名称
|
|
|
path: /kxs-gateway # 容器内目录 绝对路径
|
|
|
settings:
|
|
|
- host: 172.27.251.48
|
|
|
- username: root
|
|
|
- password: esG1rZb2ZvalCbOc
|
|
|
+ host:
|
|
|
+ from_secret: host
|
|
|
+ username:
|
|
|
+ from_secret: username
|
|
|
+ password:
|
|
|
+ from_secret: userpwd
|
|
|
port: 22
|
|
|
command_timeout: 2m
|
|
|
target: /home/ABServer/webroot/
|
|
|
@@ -61,14 +65,15 @@ steps:
|
|
|
|
|
|
- name: deploy-project
|
|
|
image: appleboy/drone-ssh
|
|
|
+ pull: if-not-exists
|
|
|
depends_on: [scp-project] # 依赖的步骤
|
|
|
settings:
|
|
|
- host: 172.27.251.48
|
|
|
- # from_secret: server_host
|
|
|
- user: root
|
|
|
- # from_secret: server_username
|
|
|
- password: esG1rZb2ZvalCbOc
|
|
|
- # from_secret: server_password
|
|
|
+ host:
|
|
|
+ from_secret: host
|
|
|
+ username:
|
|
|
+ from_secret: username
|
|
|
+ password:
|
|
|
+ from_secret: userpwd
|
|
|
port: 22
|
|
|
command_timeout: 2m
|
|
|
script:
|