From 746d39660a2b62441dcdc9958c950d4cba517ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=96=87=E8=89=B3?= Date: Fri, 12 Jun 2026 21:05:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 18 +++++++++++++++--- .../FangjiaOpenExceptionHandler.java | 2 +- .../AuthenticationInterceptor.java | 2 +- .../groovy/com/fangjia/script/BaseBatch.groovy | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 777511c03..46c4c187d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -55,7 +55,7 @@ def PROJECT_CONFIG = [ imageName : 'fangjia-open', composeDir : 'fangjia-open', serviceName : 'fangjia-open', - deployHost : '192.168.0.36', + deployHost : ['192.168.0.36', '192.168.0.18'], deployBase : '/home/docker', sshCredId : 'goojia-ssh', ], @@ -155,12 +155,24 @@ pipeline { ' """ } else { - sh """ + if(cfg.deployHost instanceof String){ + sh """ sshpass -p "\$SSH_PASS" ssh -o StrictHostKeyChecking=no \$SSH_USER@${cfg.deployHost} ' cd ${cfg.deployBase}/${cfg.composeDir} docker compose up -d --no-deps --force-recreate ${cfg.serviceName} ' - """ + """ + }else{ + for(def host in cfg.deployHost){ + sh """ + sshpass -p "\$SSH_PASS" ssh -o StrictHostKeyChecking=no \$SSH_USER@${host} ' + cd ${cfg.deployBase}/${cfg.composeDir} + docker compose up -d --no-deps --force-recreate ${cfg.serviceName} + ' + """ + } + } + } } } diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/exceptionhander/FangjiaOpenExceptionHandler.java b/projects/fangjia-open/src/main/java/com/fangjia/open/exceptionhander/FangjiaOpenExceptionHandler.java index 8381258ad..051e404ac 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/exceptionhander/FangjiaOpenExceptionHandler.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/exceptionhander/FangjiaOpenExceptionHandler.java @@ -22,7 +22,7 @@ public class FangjiaOpenExceptionHandler implements ExceptionHandler { LOGGER.error("请求地址:{}", context.getRequest().getRequestURL().toString(), e); } String ip = getLocalHostIP(); - String token = "ae14f50045e9375c354940a2afb86f14e453bd1f08f78da0ba6e788d35bccec4"; + String token = "b11e4456aa0a15f62fe239a61bc15ce4aefcba7be14b3bff504ebbbfc76f5333"; try { DingDingMessageUtil.sendTextMessage(token, "[OpenApi] "+ip+"服务器内部错误,请及时关注!"); } catch (Exception e1) { diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/interceptors/AuthenticationInterceptor.java b/projects/fangjia-open/src/main/java/com/fangjia/open/interceptors/AuthenticationInterceptor.java index aafee1e5e..8f53699bc 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/interceptors/AuthenticationInterceptor.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/interceptors/AuthenticationInterceptor.java @@ -109,7 +109,7 @@ public class AuthenticationInterceptor implements Interceptor { } } catch (Exception e) { String ip = getLocalHostIP(); - String token = "ae14f50045e9375c354940a2afb86f14e453bd1f08f78da0ba6e788d35bccec4"; + String token = "b11e4456aa0a15f62fe239a61bc15ce4aefcba7be14b3bff504ebbbfc76f5333"; try { DingDingMessageUtil.sendTextMessage(token, "[OpenApi] "+ip+"Authentication 错误!"); } catch (Exception e1) { diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/BaseBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/BaseBatch.groovy index 9daa2258a..8928dfb10 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/BaseBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/BaseBatch.groovy @@ -112,7 +112,7 @@ abstract class BaseBatch { } def phoneNum = getBatchPhones(batch) if(SystemUtils.IS_OS_LINUX){ - sendDingDingMsg("ae14f50045e9375c354940a2afb86f14e453bd1f08f78da0ba6e788d35bccec4",msg, phoneNum) + sendDingDingMsg("b11e4456aa0a15f62fe239a61bc15ce4aefcba7be14b3bff504ebbbfc76f5333",msg, phoneNum) // try { // Map params = new HashMap();