From 9174dae72aa5d50874130e9735c30da9bff82e33 Mon Sep 17 00:00:00 2001 From: XinWei <2718030729@qq.com> Date: Mon, 28 Oct 2024 10:34:13 +0800 Subject: [PATCH] 'test' --- .drone.yml | 59 ++++++++++++++++++------------------------------------ 1 file changed, 19 insertions(+), 40 deletions(-) diff --git a/.drone.yml b/.drone.yml index b9dedde..d99d4b4 100644 --- a/.drone.yml +++ b/.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 # 从宿主机中挂载的目录 \ No newline at end of file + 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 / \ No newline at end of file