This commit is contained in:
parent
97d424266f
commit
49063eb787
31
.drone.yml
31
.drone.yml
@ -25,8 +25,8 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
|||||||
|
|
||||||
- mvn package -Dmaven.test.skip=true # 应用打包命令
|
- mvn package -Dmaven.test.skip=true # 应用打包命令
|
||||||
|
|
||||||
# - cd yudao-server/target/
|
- cd yudao-server/target/
|
||||||
# - ls
|
- ls
|
||||||
|
|
||||||
- cp yudao-server/target/yudao-server.jar /app/build/yudao-server.jar
|
- cp yudao-server/target/yudao-server.jar /app/build/yudao-server.jar
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
- name: build-start
|
- name: copy build
|
||||||
|
|
||||||
image: appleboy/drone-ssh # SSH工具镜像
|
image: appleboy/drone-ssh # SSH工具镜像
|
||||||
|
|
||||||
@ -56,14 +56,33 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- ls
|
- ls
|
||||||
- scp -r /zymail/maven/build root@1.14.205.126:/zymail/build
|
- scp -r /zymail/maven/build root@1.14.205.126:/zymail
|
||||||
- ssh root@1.14.205.126
|
# - ssh root@1.14.205.126
|
||||||
- ls
|
# - ls
|
||||||
|
|
||||||
# - chmod +x run.sh # 更改为可执行脚本
|
# - chmod +x run.sh # 更改为可执行脚本
|
||||||
|
|
||||||
# - ./run.sh # 运行脚本打包应用镜像并运行
|
# - ./run.sh # 运行脚本打包应用镜像并运行
|
||||||
|
- name: build-start
|
||||||
|
|
||||||
|
image: appleboy/drone-ssh # SSH工具镜像
|
||||||
|
|
||||||
|
settings:
|
||||||
|
|
||||||
|
host: 1.14.205.126 # 远程连接地址
|
||||||
|
|
||||||
|
username: root # 远程连接账号
|
||||||
|
|
||||||
|
password:
|
||||||
|
|
||||||
|
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||||
|
|
||||||
|
port: 22 # 远程连接端口
|
||||||
|
|
||||||
|
command_timeout: 5m # 远程执行命令超时时间
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ls
|
||||||
|
|
||||||
|
|
||||||
volumes: # 定义流水线挂载目录,用于共享数据
|
volumes: # 定义流水线挂载目录,用于共享数据
|
||||||
|
Loading…
Reference in New Issue
Block a user