From a2a66711310e79743cf2ed5cb060a7821b2051ad Mon Sep 17 00:00:00 2001 From: XinWei <2718030729@qq.com> Date: Wed, 28 Aug 2024 12:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone-datacenter.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.drone-datacenter.yml b/.drone-datacenter.yml index dcc3b924f..1cd9b4fb1 100644 --- a/.drone-datacenter.yml +++ b/.drone-datacenter.yml @@ -94,18 +94,18 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 command_timeout: 10m # 远程执行命令超时时间 - script: - - cd /root/ludu-cloud - - git pull origin master - - rm -f ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/framework/nacos/config/BeanInit.java - - /root/apache-maven-3.9.4/bin/mvn clean package -Dmaven.test.skip=true - - port=48092 # 指定端口号 - - pid=$(lsof -t -i:$port) # 获取占用指定端口的进程号 - - if [ -n "$pid" ]; then + script: | + cd /root/ludu-cloud + git pull origin master + rm -f ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/framework/nacos/config/BeanInit.java + /root/apache-maven-3.9.4/bin/mvn clean package -Dmaven.test.skip=true + port=48092 # 指定端口号 + pid=$(lsof -t -i:$port) # 获取占用指定端口的进程号 + if [ -n "$pid" ]; then echo "Killing process $pid" kill -9 $pid - fi - - nohup java -Xms256m -Xmx256m -jar ludu-module-datacenter/ludu-module-datacenter-biz/target/ludu-module-datacenter-biz.jar > api.log & + fi + nohup java -Xms256m -Xmx256m -jar ludu-module-datacenter/ludu-module-datacenter-biz/target/ludu-module-datacenter-biz.jar > api.log & volumes: # 定义流水线挂载目录,用于共享数据