This commit is contained in:
parent
3bd85df0d2
commit
9174dae72a
59
.drone.yml
59
.drone.yml
@ -5,44 +5,23 @@ name: microservice-build
|
||||
clone:
|
||||
disable: true
|
||||
steps:
|
||||
- name: debug-env
|
||||
image: alpine:latest
|
||||
commands:
|
||||
- env
|
||||
- name: build-service
|
||||
image: maven:3-jdk-8
|
||||
volumes:
|
||||
- name: test-dir
|
||||
path: /root/aaa
|
||||
commands:
|
||||
# - echo "Building Service: ${SERVICE}"
|
||||
- mkdir -p /root/aaa
|
||||
- cd /root/aaa
|
||||
- touch test.txt
|
||||
- |
|
||||
if [ ${SERVICE} = "gateway" ]; then
|
||||
echo "Building Gateway Service..."
|
||||
elif [ ${SERVICE} = "system" ]; then
|
||||
echo "Building System Service..."
|
||||
else
|
||||
echo "Building All Services..."
|
||||
# 如果有其他服务,可以在这里继续添加
|
||||
fi
|
||||
- name: test-build
|
||||
|
||||
- name: test-service
|
||||
image: maven:3-jdk-8
|
||||
commands:
|
||||
# - echo "Testing Service: ${SERVICE}"
|
||||
- |
|
||||
if [ "${SERVICE}" = "gateway" ]; then
|
||||
echo "Testing Gateway Service..."
|
||||
elif [ "${SERVICE}" = "system" ]; then
|
||||
echo "Testing System Service..."
|
||||
else
|
||||
echo "Testing All Services..."
|
||||
# 如果有其他服务,可以在这里继续添加
|
||||
fi
|
||||
volumes:
|
||||
- name: test-dir
|
||||
host:
|
||||
path: /root/test-dir # 从宿主机中挂载的目录
|
||||
image: appleboy/drone-ssh # SSH工具镜像
|
||||
|
||||
settings:
|
||||
|
||||
host: 47.118.40.3 # 远程连接地址
|
||||
|
||||
username: root # 远程连接账号
|
||||
|
||||
private_key:
|
||||
|
||||
from_secret: ssh_private_key # 从Secret中读取SSH密码
|
||||
|
||||
port: 22 # 远程连接端口
|
||||
|
||||
command_timeout: 20m # 远程执行命令超时时间
|
||||
|
||||
script:
|
||||
- ls /
|
Loading…
Reference in New Issue
Block a user