diff --git a/.dockerignore b/.dockerignore
index 8e932feb8..99a8c7683 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -201,3 +201,7 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
+
+.git
+modules/server/logs
+modules/agent/logs
diff --git a/.gitee/ISSUE_TEMPLATE/config.yaml b/.gitee/ISSUE_TEMPLATE/config.yaml
index 4aa898a76..31ce0cf79 100644
--- a/.gitee/ISSUE_TEMPLATE/config.yaml
+++ b/.gitee/ISSUE_TEMPLATE/config.yaml
@@ -1,3 +1,26 @@
+#
+# The MIT License (MIT)
+#
+# Copyright (c) 2019 Code Technology Studio
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+# the Software, and to permit persons to whom the Software is furnished to do so,
+# subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
blank_issues_enabled: false
contact_links:
- name: Jpom 官方文档
diff --git a/.gitignore b/.gitignore
index 224905b56..cee4098a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,7 @@ yarn-error.log
.idea
yarn.lock
package-lock.json
+pnpm-lock.yaml
*bak
pom.xml.versionsBackup
#.vscode
diff --git a/CHANGELOG-BETA.md b/CHANGELOG-BETA.md
index ec447750c..081072e79 100644
--- a/CHANGELOG-BETA.md
+++ b/CHANGELOG-BETA.md
@@ -1,5 +1,92 @@
# 🚀 版本日志
+### 2.10.42.5-beta
+
+### 🐣 新增功能
+
+1. 【server】新增 集群化管理工作空间(感谢@定格、[@paobu](https://gitee.com/iniushi) [Gitee issues I7UG5V](https://gitee.com/dromara/Jpom/issues/I7UG5V))
+
+### 🐞 解决BUG、优化功能
+
+1. 【server】修复 资产管理 SSH 管理系统名称显示未知问题(感谢@勤思·)
+2. 【server】优化 资产管理 Docker 管理支持配置分组
+3. 【server】优化 仓库管理支持配置分组
+4. 【server】优化 SSH 文件夹支持前端排序(感谢@勤思·)
+
+------
+
+### 2.10.42.4-beta (2023-08-19)
+
+### 🐣 新增功能
+
+1. 【server】优化 ssh 相关功能支持 openssh8+
+ (感谢 [@孤城落寞](https://gitee.com/gclm) [Gitee pr 193](https://gitee.com/dromara/Jpom/pulls/193) )
+
+### 🐞 解决BUG、优化功能
+
+1. 【server】优化 仓库账号、 SSH 证书密码支持选择环境变量
+2. 【all】升级 commons-compress、fastjson、hutool 版本
+3. 【server】优化 maven 依赖冲突
+4. 【server】优化 文件发布-节点发布文件名使用真实名称(感谢@勤思·)
+5. 【server】优化 文件发布-ssh发布新增变量:FILE_NAME、FILE_EXT_NAME
+
+------
+
+### 2.10.42.3-beta (2023-08-04)
+
+### 🐣 新增功能
+
+1. 【server】新增 SSH
+ 文件管理修改文件权限功能(感谢 [@MichelleChung](https://gitee.com/michelle1028) [Gitee issues I6VDXS](https://gitee.com/dromara/Jpom/issues/I6VDXS) )
+
+### 🐞 解决BUG、优化功能
+
+1. 【server】升级 h2、SpringBoot 版本
+2. 【server】使用系统git时,无法克隆tag问题优化 (感谢@唐明)
+3. 【server】优化 SSH 和 代码仓库的密码从工作空间变量中读取
+
+------
+
+### 2.10.42.2-beta (2023-07-04)
+
+### 🐣 新增功能
+
+1. 【server】新增 Docker 容器重建功能,即删除原有的容器,重新创建一个新的容器
+
+### 🐞 解决BUG、优化功能
+
+1. 【server】优化
+ 删除工作空间前预检查关联数据存在情况(感谢 [@陈旭](https://gitee.com/chenxu8989) [Gitee issues I7F0ZN](https://gitee.com/dromara/Jpom/issues/I7F0ZN) )
+2. 【server】优化
+ 退出登录支持彻底退出、切换账号退出(感谢 [@wangfubiao](https://gitee.com/wangfubiao) [Gitee issues I7GA5Q](https://gitee.com/dromara/Jpom/issues/I7GA5Q) )
+3. 【server】优化 IP 白名单验证忽略 IPV6 情况
+4. 【server】优化 服务端缓存管理支持查看黑名单 IP 详细信息(感谢@酱总)
+
+------
+
+### 2.10.42.1-beta (2023-06-26)
+
+### 🐣 新增功能
+
+1. 【server】新增 Docker 管理增加 SSH 连接
+
+### 🐞 解决BUG、优化功能
+
+1. 【server】修复 SSH
+ 编辑输入框出现部分关键词时保持报错(感谢 [@一只羊](https://gitee.com/hjdyzy) [Gitee issues I7E3UG](https://gitee.com/dromara/Jpom/issues/I7E3UG) )
+2. 【server】优化 日志组件支持显示 \t 制表符、清空缓冲区滚动到顶部
+3. 【server】修复 彻底删除节点分发时未自动删除关联日志(感谢@ccx2480)
+4. 【server】修复
+ 节点管理中脚本模板翻页无效(感谢 [@wangfubiao](https://gitee.com/wangfubiao) [Gitee issues I7F0RS](https://gitee.com/dromara/Jpom/issues/I7F0RS) )
+5. 【server】优化
+ 工作空间配置页面中新增节点分发白名单配置入口(感谢 [@陈旭](https://gitee.com/chenxu8989) [Gitee issues I7F0W0](https://gitee.com/dromara/Jpom/issues/I7F0W0) )
+6. 【server】优化 构建附加环境变量支持解析 URL 参数格式
+ (感谢 [@爱琳琳真是太好了](https://gitee.com/qiqi513_admin) [Gitee issues I7FROG](https://gitee.com/dromara/Jpom/issues/I7FROG) )
+7. 【server】优化 构建支持单个配置保留天数和保留个数
+ (感谢 [@阿超](https://gitee.com/VampireAchao) [Gitee issues I7FOG2](https://gitee.com/dromara/Jpom/issues/I7FOG2) )
+
+------
+
### 2.10.41.3-beta (2023-06-12)
### 🐣 新增功能
@@ -16,7 +103,8 @@
4. 【server】优化 页面滚动条样式
5. 【server】优化 编辑关联分发,选择项目下拉框不能显示项目全名称(tooltip)(感谢@LYY)
6. 【server】优化 监听页面关闭事件,主动关闭 websocket
-7. 【server】修复 批量构建触发器无法正常使用(感谢 [@botboy](https://github.com/cheakin) [Github issues 48](https://github.com/dromara/Jpom/issues/48) )
+7. 【server】修复
+ 批量构建触发器无法正常使用(感谢 [@botboy](https://github.com/cheakin) [Github issues 48](https://github.com/dromara/Jpom/issues/48) )
### ⚠️ 注意
@@ -50,8 +138,10 @@
1. 【server】优化 资产管理支持管理共享仓库
2. 【server】优化 增大验证码检测功能异常捕捉范围
-3. 【server】修复 令牌导入仓库令牌长度不足问题(感谢 [@Sherman Chu](https://github.com/yeliulee) [Github issues 45](https://github.com/dromara/Jpom/issues/45) )
-4. 【server】修复 分发列表配置功能无法使用(感谢 [@Free](https://gitee.com/fjlyy321) [Gitee issues I716UI](https://gitee.com/dromara/Jpom/issues/I716UI) )
+3. 【server】修复
+ 令牌导入仓库令牌长度不足问题(感谢 [@Sherman Chu](https://github.com/yeliulee) [Github issues 45](https://github.com/dromara/Jpom/issues/45) )
+4. 【server】修复
+ 分发列表配置功能无法使用(感谢 [@Free](https://gitee.com/fjlyy321) [Gitee issues I716UI](https://gitee.com/dromara/Jpom/issues/I716UI) )
5. 【server】修复 构建卡片布局、构建详情中构建方式显示不正确(感谢@A)
------
@@ -60,8 +150,10 @@
### 🐞 解决BUG、优化功能
-1. 【server】修复 仓库编辑清除密码按钮弹窗层级问题(感谢 [@轩辕豆豆](https://gitee.com/xuanyuandoudou) [Gitee issues I6VSCR](https://gitee.com/dromara/Jpom/issues/I6VSCR) )
-2. 【server】修复 优化构建列表卡片布局存在未构建数据布局错乱问题(感谢 [@lin_yeqi](https://gitee.com/lin_yeqi) [Gitee issues I6VUB7](https://gitee.com/dromara/Jpom/issues/I6VUB7) )
+1. 【server】修复
+ 仓库编辑清除密码按钮弹窗层级问题(感谢 [@轩辕豆豆](https://gitee.com/xuanyuandoudou) [Gitee issues I6VSCR](https://gitee.com/dromara/Jpom/issues/I6VSCR) )
+2. 【server】修复
+ 优化构建列表卡片布局存在未构建数据布局错乱问题(感谢 [@lin_yeqi](https://gitee.com/lin_yeqi) [Gitee issues I6VUB7](https://gitee.com/dromara/Jpom/issues/I6VUB7) )
------
@@ -69,7 +161,7 @@
### 🐞 解决BUG、优化功能
-1. 【server】修复 在线更新无法正常使用
+1. 【server】修复 在线更新无法正常使用
------
@@ -77,7 +169,8 @@
### 🐣 新增功能
-1. 【server】新增 容器构建中对 gradle 插件的支持(感谢 [@xiaozhi](https://gitee.com/XiaoZhiGongChengShi) [Gitee pr 188](https://gitee.com/dromara/Jpom/pulls/188) )
+1. 【server】新增 容器构建中对 gradle
+ 插件的支持(感谢 [@xiaozhi](https://gitee.com/XiaoZhiGongChengShi) [Gitee pr 188](https://gitee.com/dromara/Jpom/pulls/188) )
### 🐞 解决BUG、优化功能
@@ -97,7 +190,8 @@
1. 【server】修复 清空浏览器缓存未跳转到登录页面
2. 【server】优化 构建拉取 git 仓库支持使用服务器中的 git 插件,实现配置克隆深度参数
-3. 【server】修复 删除节点脚本报错(感谢 [@xiaozhi](https://gitee.com/XiaoZhiGongChengShi) [Gitee issues I6USMY](https://gitee.com/dromara/Jpom/issues/I6USMY) )
+3. 【server】修复
+ 删除节点脚本报错(感谢 [@xiaozhi](https://gitee.com/XiaoZhiGongChengShi) [Gitee issues I6USMY](https://gitee.com/dromara/Jpom/issues/I6USMY) )
------
@@ -141,7 +235,6 @@
------
-
### 2.10.39.4-beta (2023-04-03)
### 🐞 解决BUG、优化功能
@@ -196,7 +289,6 @@
### 2.10.38.10-beta (2023-03-30)
-
### 🐞 解决BUG、优化功能
1. 【server】修复 节点脚本支持全局共享同步节点、节点管理查看脚本重复问题(感谢@奇奇)
@@ -232,7 +324,7 @@
### 🐣 新增功能
-1. 【server】新增 构建新增配置排除发布目录表达式(感谢@毛毛虫)
+1. 【server】新增 构建新增配置排除发布目录表达式(感谢@毛毛虫)
### 🐞 解决BUG、优化功能
@@ -298,7 +390,8 @@
### 🐣 新增功能
-1. 【server】新增 支持 oauth2 登录 (感谢 [@MaxKeyTop](https://gitee.com/maxkeytop_admin) [Gitee pr 183](https://gitee.com/dromara/Jpom/pulls/183) )
+1. 【server】新增 支持 oauth2 登录
+ (感谢 [@MaxKeyTop](https://gitee.com/maxkeytop_admin) [Gitee pr 183](https://gitee.com/dromara/Jpom/pulls/183) )
### 🐞 解决BUG、优化功能
diff --git a/PLANS.md b/PLANS.md
index 0c9463446..ad2a97d56 100644
--- a/PLANS.md
+++ b/PLANS.md
@@ -3,60 +3,66 @@
## 2.10.x
1. **构建流水线**
-2. **资产管理**
+2. **netty-agent**
+3. 凭证管理
+4. 升级 JDK 11 或者 17
+5. 端口监控、监控报警、机器监控、ssh 监控报警
+6. 资产监控
+7. nginx 流量切换(nginx 功能可能下线)
+8. acme.sh ui
+9. 执行审计
+10. 执行部分命令耗时和直接执行相差太大
+11. **非 root 用户提升权限写入 root 用户文件**
+12. 部分数据迁移工作空间(项目,构建,仓库、节点分发)
+13. 前端表格用户自定义列显示
+14. 前端升级 vue3
+15. `导入云效仓库 (zx) 依赖太重,非单接口实现(需要标准验证流程)`
+16. 节点取消,白名单配置和下载白名单(统一到服务端工作空间配置)
+17. ~~仓库~~、构建、分发、~~项目~~导入导出
+18. 隧道节点
+19. ~~docker 容器编辑重建(zx)~~
+20. 前端主题切换
+21. docker-compose sh
+22. ~~仓库密码、ssh 密码引用环境变量支持使用下拉框 sh~~
+23. 监控通知模块优化支持更多(飞书) zx
+24. SSH 修改文件权限 zx
+25. vue3 资产管理 zs
+26. vue3 用户管理 zs
+
+### DONE
+
+1. ~~SSH 连接 docker (sh)~~
+2. ~~批量删除镜像 (sh)~~
+3. **资产管理**
1. ~~机器管理~~
2. ~~机器监控~~
3. ~~SSH 管理~~
4. ~~dokcer 管理~~
5. ~~docker 集群~~
6. ~~ssh 监控~~
- 7. 仓库管理(待定,可以和凭证管理一起考虑)
-3. netty-agent
-4. 凭证管理
-5. 升级 JDK 11 或者 17
-6. 端口监控、监控报警、机器监控、ssh 监控报警
-7. nginx 流量切换
-8. acme.sh ui
-9. 执行审计
-10. 执行部分命令耗时和直接执行相差太大
-11. 监控通知模块优化支持更多(飞书)
-12. **非 root 用户提升权限写入 root 用户文件**
-13. 部分数据迁移工作空间(项目,构建,仓库、节点分发)
-14. 前端表格用户自定义列显示
-15. 前端升级 vue3
-16. `导入云效仓库 (zx) 依赖太重,非单接口实现(需要标准验证流程)`
-17. 节点取消,白名单配置和下载白名单(统一到服务端工作空间配置)
-18. ~~仓库~~、构建、分发、~~项目~~导入导出
-19. SSH 连接 docker (sh)
-20. docker-compose
-21. 隧道节点
-22. 批量删除镜像 (sh)
-23. docker 容器编辑重建(zx)
-24. 仓库引用环境变量支持使用下拉框
-
-### DONE
-1. ~~使用服务端的 git 插件~~
-2. ~~日志组件卡顿~~
-3. ~~清理触发器表~~
-4. ~~scp 发布实践案例~~
-5. ~~SSH 上传文件进度(前端分片+进度)~~
-6. ~~**用户体系支持接入第三方系统**~~
-7. ~~传输信息加密(混淆,避免 http 明文传输)~~
-8. ~~插件端证书验证迁移到服务端~~
-9. ~~稳定版/体验版~~
-10. ~~插件端自定义发布文件~~
-11. ~~容器构建基础镜像的管理~~
-12. ~~tomcat 实践案例~~
-13. ~~**分片上传文件**~~
-14. ~~**支持 mysql 数据库**~~
-15. ~~配置文件优化~~
-16. ~~项目触发器~~
-17. ~~节点转发模块优化~~
-18. ~~构建事件触发新增更多(前后)~~
-19. ~~复制项目~~
-20. ~~测命令行参数~~
-21. ~~标签页缓存问题(定时器未清空)~~
-22. ~~发布到指定目录~~
+ 7. ~~仓库管理(待定,可以和凭证管理一起考虑)~~
+4. ~~使用服务端的 git 插件~~
+5. ~~日志组件卡顿~~
+6. ~~清理触发器表~~
+7. ~~scp 发布实践案例~~
+8. ~~SSH 上传文件进度(前端分片+进度)~~
+9. ~~**用户体系支持接入第三方系统**~~
+10. ~~传输信息加密(混淆,避免 http 明文传输)~~
+11. ~~插件端证书验证迁移到服务端~~
+12. ~~稳定版/体验版~~
+13. ~~插件端自定义发布文件~~
+14. ~~容器构建基础镜像的管理~~
+15. ~~tomcat 实践案例~~
+16. ~~**分片上传文件**~~
+17. ~~**支持 mysql 数据库**~~
+18. ~~配置文件优化~~
+19. ~~项目触发器~~
+20. ~~节点转发模块优化~~
+21. ~~构建事件触发新增更多(前后)~~
+22. ~~复制项目~~
+23. ~~测命令行参数~~
+24. ~~标签页缓存问题(定时器未清空)~~
+25. ~~发布到指定目录~~
## 2.8.x
diff --git a/README.md b/README.md
index 16937cb8f..961242cb8 100644
--- a/README.md
+++ b/README.md
@@ -289,6 +289,7 @@ docker-compose -f docker-compose.yml up
# docker-compose -f docker-compose.yml build --no-cache
# docker-compose -f docker-compose-local.yml up
# docker-compose -f docker-compose-local.yml build --build-arg TEMP_VERSION=.0
+# docker-compose -f docker-compose-cluster.yml up --build
```
### 方式六:💻 编译运行
diff --git a/SECURITY.md b/SECURITY.md
index 97c198339..8330946a8 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -7,6 +7,7 @@ currently being supported with security updates.
| Version | Supported |
|-------------|--------------------|
+| 2.10.x | :white_check_mark: |
| 2.9.x | :white_check_mark: |
| 2.8.x | :x: |
| 2.8.1-2.8.6 | :x: |
diff --git a/docker-compose-cluster.yml b/docker-compose-cluster.yml
new file mode 100644
index 000000000..3bd2638e9
--- /dev/null
+++ b/docker-compose-cluster.yml
@@ -0,0 +1,85 @@
+version: '3.8'
+services:
+ server:
+ env_file:
+ - env-beta.env
+ image: jpomdocker/jpom:server-${JPOM_VERSION}
+ build:
+ dockerfile: ./modules/server/Dockerfile
+ context: .
+ args:
+ JPOM_VERSION: ${JPOM_VERSION}
+ environment:
+ "JPOM_SERVER_TEMP_TOKEN": ${SERVER_TOKEN}
+ "jpom.cluster.id": server00
+ volumes:
+ - jpom-server-data:/usr/local/jpom-server/data
+ - jpom-server-logs:/usr/local/jpom-server/logs
+ - jpom-server-conf:/usr/local/jpom-server/conf
+ ports:
+ - "2122:2122"
+ hostname: server
+ server01:
+ env_file:
+ - env-beta.env
+ image: jpomdocker/jpom:server-${JPOM_VERSION}
+ build:
+ dockerfile: ./modules/server/Dockerfile
+ context: .
+ args:
+ JPOM_VERSION: ${JPOM_VERSION}
+ environment:
+ "JPOM_SERVER_TEMP_TOKEN": ${SERVER_TOKEN}
+ "jpom.cluster.id": server01
+ volumes:
+ - jpom-server01-data:/usr/local/jpom-server/data
+ - jpom-server01-logs:/usr/local/jpom-server/logs
+ - jpom-server01-conf:/usr/local/jpom-server/conf
+ ports:
+ - "2120:2122"
+ hostname: server01
+ agent01:
+ env_file:
+ - env-beta.env
+ image: jpomdocker/jpom:agent-${JPOM_VERSION}
+ build:
+ dockerfile: ./modules/agent/Dockerfile
+ context: .
+ args:
+ JPOM_VERSION: ${JPOM_VERSION}
+ RUN_ARG: --auto-push-to-server 'http://server:2122/api/node/receive_push?token=${SERVER_TOKEN}&workspaceId=DEFAULT'
+
+ volumes:
+ - jpom-agent01:/usr/local/jpom-agent
+ ports:
+ - "2123:2123"
+ depends_on:
+ - server
+ hostname: agent01
+ agent02:
+ env_file:
+ - env-beta.env
+ image: jpomdocker/jpom:agent-${JPOM_VERSION}
+ build:
+ dockerfile: ./modules/agent/Dockerfile
+ context: .
+ args:
+ JPOM_VERSION: ${JPOM_VERSION}
+ RUN_ARG: --auto-push-to-server 'http://server01:2122/api/node/receive_push?token=${SERVER_TOKEN}&workspaceId=DEFAULT'
+
+ volumes:
+ - jpom-agent02:/usr/local/jpom-agent
+ ports:
+ - "2124:2123"
+ depends_on:
+ - server01
+ hostname: agent02
+volumes:
+ jpom-agent01:
+ jpom-agent02:
+ jpom-server-data:
+ jpom-server-logs:
+ jpom-server-conf:
+ jpom-server01-data:
+ jpom-server01-logs:
+ jpom-server01-conf:
diff --git a/env-beta.env b/env-beta.env
index a3b000d45..cf51d718c 100644
--- a/env-beta.env
+++ b/env-beta.env
@@ -1,3 +1,3 @@
-JPOM_VERSION=2.10.41.3
+JPOM_VERSION=2.10.42.4
# Server Token 生产部署请更换
SERVER_TOKEN=7094f673-2c53-4fc1-82e7-86e528449d97
diff --git a/modules/agent-transport/agent-transport-common/pom.xml b/modules/agent-transport/agent-transport-common/pom.xml
index 11e35465f..d8bedd856 100644
--- a/modules/agent-transport/agent-transport-common/pom.xml
+++ b/modules/agent-transport/agent-transport-common/pom.xml
@@ -30,7 +30,7 @@
org.dromara.jpom.agent-transport
jpom-agent-transport-parent
- 2.10.41
+ 2.10.42.4
../pom.xml
diff --git a/modules/agent-transport/agent-transport-http/pom.xml b/modules/agent-transport/agent-transport-http/pom.xml
index 87f4adbc2..06555647b 100644
--- a/modules/agent-transport/agent-transport-http/pom.xml
+++ b/modules/agent-transport/agent-transport-http/pom.xml
@@ -30,7 +30,7 @@
org.dromara.jpom.agent-transport
jpom-agent-transport-parent
- 2.10.41
+ 2.10.42.4
../pom.xml
diff --git a/modules/agent-transport/pom.xml b/modules/agent-transport/pom.xml
index 5e5b243a2..6ae9f85e1 100644
--- a/modules/agent-transport/pom.xml
+++ b/modules/agent-transport/pom.xml
@@ -29,7 +29,7 @@
jpom-parent
org.dromara.jpom
- 2.10.41
+ 2.10.42.4
../../pom.xml
pom
@@ -38,7 +38,7 @@
agent-transport-http
4.0.0
- 2.10.41
+ 2.10.42.4
org.dromara.jpom.agent-transport
jpom-agent-transport-parent
Jpom Agent Transport
diff --git a/modules/agent/Dockerfile b/modules/agent/Dockerfile
index b04f3a6ce..0989edc72 100644
--- a/modules/agent/Dockerfile
+++ b/modules/agent/Dockerfile
@@ -30,7 +30,7 @@ VOLUME ["/root/.m2"]
ARG TEMP_VERSION=""
ARG JPOM_VERSION
ENV USE_JPOM_VERSION=${JPOM_VERSION}${TEMP_VERSION}
-RUN --mount=type=cache,target=/root/.m2 sh ./script/replaceVersion.sh ${USE_JPOM_VERSION}
+RUN --mount=type=cache,target=/root/.m2 sh ./script/replaceVersion.sh ${USE_JPOM_VERSION} "release"
RUN --mount=type=cache,target=/root/.m2 mvn -B -e -T 1C clean package -pl modules/agent -am -Dmaven.test.skip=true -Dmaven.compile.fork=true -s script/settings.xml
diff --git a/modules/agent/pom.xml b/modules/agent/pom.xml
index 60971ba39..5b7285511 100644
--- a/modules/agent/pom.xml
+++ b/modules/agent/pom.xml
@@ -29,12 +29,12 @@
jpom-parent
org.dromara.jpom
- 2.10.41
+ 2.10.42.4
../../pom.xml
4.0.0
agent
- 2.10.41
+ 2.10.42.4
Jpom Agent
org.dromara.jpom.JpomAgentApplication
@@ -81,11 +81,6 @@
${project.version}
-
- cn.hutool
- hutool-json
-
-
diff --git a/modules/agent/src/main/java/org/dromara/jpom/common/interceptor/AuthorizeInterceptor.java b/modules/agent/src/main/java/org/dromara/jpom/common/interceptor/AuthorizeInterceptor.java
index 76198b177..5e2b262f8 100644
--- a/modules/agent/src/main/java/org/dromara/jpom/common/interceptor/AuthorizeInterceptor.java
+++ b/modules/agent/src/main/java/org/dromara/jpom/common/interceptor/AuthorizeInterceptor.java
@@ -24,8 +24,8 @@ package org.dromara.jpom.common.interceptor;
import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.servlet.ServletUtil;
+import cn.keepbx.jpom.model.JsonMessage;
import org.dromara.jpom.common.Const;
-import org.dromara.jpom.common.JsonMessage;
import org.dromara.jpom.system.AgentAuthorize;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
diff --git a/modules/agent/src/main/java/org/dromara/jpom/controller/IndexController.java b/modules/agent/src/main/java/org/dromara/jpom/controller/IndexController.java
index aeae3f825..5ed325174 100644
--- a/modules/agent/src/main/java/org/dromara/jpom/controller/IndexController.java
+++ b/modules/agent/src/main/java/org/dromara/jpom/controller/IndexController.java
@@ -26,11 +26,12 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
import cn.hutool.system.SystemUtil;
+import cn.keepbx.jpom.IJsonMessage;
+import cn.keepbx.jpom.model.JsonMessage;
import com.alibaba.fastjson2.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.dromara.jpom.common.BaseAgentController;
import org.dromara.jpom.common.JpomManifest;
-import org.dromara.jpom.common.JsonMessage;
import org.dromara.jpom.common.RemoteVersion;
import org.dromara.jpom.common.commander.AbstractProjectCommander;
import org.dromara.jpom.common.commander.AbstractSystemCommander;
@@ -78,7 +79,7 @@ public class IndexController extends BaseAgentController {
}
@RequestMapping(value = "info", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage info() {
+ public IJsonMessage info() {
JpomManifest instance = JpomManifest.getInstance();
cn.keepbx.jpom.RemoteVersion remoteVersion = RemoteVersion.cacheInfo();
@@ -97,7 +98,7 @@ public class IndexController extends BaseAgentController {
* @return json
*/
@PostMapping(value = "get-stat-info", produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage getDirectTop() {
+ public IJsonMessage getDirectTop() {
JSONObject jsonObject = new JSONObject();
JSONObject topInfo = OshiUtils.getSimpleInfo();
jsonObject.put("simpleStatus", topInfo);
@@ -132,7 +133,7 @@ public class IndexController extends BaseAgentController {
@RequestMapping(value = "processList", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage> getProcessList(String processName, Integer count) {
+ public IJsonMessage> getProcessList(String processName, Integer count) {
processName = StrUtil.emptyToDefault(processName, "java");
List processes = OshiUtils.getProcesses(processName, Convert.toInt(count, 20));
processes = processes.stream()
@@ -148,7 +149,7 @@ public class IndexController extends BaseAgentController {
@PostMapping(value = "kill.json", produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage kill(int pid) {
+ public IJsonMessage kill(int pid) {
long jpomAgentId = JpomManifest.getInstance().getPid();
Assert.state(!StrUtil.equals(StrUtil.toString(jpomAgentId), StrUtil.toString(pid)), "不支持在线关闭 Agent 进程");
String result = AbstractSystemCommander.getInstance().kill(null, pid);
@@ -159,19 +160,19 @@ public class IndexController extends BaseAgentController {
}
@PostMapping(value = "disk-info", produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage> diskInfo() {
+ public IJsonMessage> diskInfo() {
List list = OshiUtils.fileStores();
return JsonMessage.success("", list);
}
@PostMapping(value = "hw-disk--info", produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage> hwDiskInfo() {
+ public IJsonMessage> hwDiskInfo() {
List list = OshiUtils.diskStores();
return JsonMessage.success("", list);
}
@PostMapping(value = "network-interfaces", produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage> networkInterfaces() {
+ public IJsonMessage> networkInterfaces() {
List list = OshiUtils.networkInterfaces();
return JsonMessage.success("", list);
}
diff --git a/modules/agent/src/main/java/org/dromara/jpom/controller/manage/FileManageController.java b/modules/agent/src/main/java/org/dromara/jpom/controller/manage/FileManageController.java
index da058d47a..40864f33a 100644
--- a/modules/agent/src/main/java/org/dromara/jpom/controller/manage/FileManageController.java
+++ b/modules/agent/src/main/java/org/dromara/jpom/controller/manage/FileManageController.java
@@ -24,9 +24,10 @@ package org.dromara.jpom.controller.manage;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.io.FileUtil;
+import cn.keepbx.jpom.IJsonMessage;
+import cn.keepbx.jpom.model.JsonMessage;
import lombok.extern.slf4j.Slf4j;
import org.dromara.jpom.common.BaseAgentController;
-import org.dromara.jpom.common.JsonMessage;
import org.dromara.jpom.common.commander.CommandOpResult;
import org.dromara.jpom.common.validator.ValidatorItem;
import org.dromara.jpom.system.AgentConfig;
@@ -55,18 +56,18 @@ public class FileManageController extends BaseAgentController {
}
@RequestMapping(value = "upload-sharding", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage uploadSharding(MultipartFile file,
- String sliceId,
- Integer totalSlice,
- Integer nowSlice,
- String fileSumMd5) throws Exception {
+ public IJsonMessage uploadSharding(MultipartFile file,
+ String sliceId,
+ Integer totalSlice,
+ Integer nowSlice,
+ String fileSumMd5) throws Exception {
String tempPathName = agentConfig.getFixedTempPathName();
this.uploadSharding(file, tempPathName, sliceId, totalSlice, nowSlice, fileSumMd5);
return JsonMessage.success("上传成功");
}
@RequestMapping(value = "sharding-merge", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage shardingMerge(String type,
+ public IJsonMessage shardingMerge(String type,
@ValidatorItem String path,
Integer stripComponents,
String sliceId,
diff --git a/modules/agent/src/main/java/org/dromara/jpom/controller/manage/ManageEditProjectController.java b/modules/agent/src/main/java/org/dromara/jpom/controller/manage/ManageEditProjectController.java
index 7ccff8e56..2dd1a8421 100644
--- a/modules/agent/src/main/java/org/dromara/jpom/controller/manage/ManageEditProjectController.java
+++ b/modules/agent/src/main/java/org/dromara/jpom/controller/manage/ManageEditProjectController.java
@@ -30,10 +30,11 @@ import cn.hutool.core.lang.RegexPool;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.EnumUtil;
import cn.hutool.core.util.StrUtil;
+import cn.keepbx.jpom.IJsonMessage;
+import cn.keepbx.jpom.model.JsonMessage;
import lombok.extern.slf4j.Slf4j;
import org.dromara.jpom.common.BaseAgentController;
import org.dromara.jpom.common.Const;
-import org.dromara.jpom.common.JsonMessage;
import org.dromara.jpom.common.commander.AbstractProjectCommander;
import org.dromara.jpom.model.RunMode;
import org.dromara.jpom.model.data.DslYmlDto;
@@ -162,7 +163,7 @@ public class ManageEditProjectController extends BaseAgentController {
@RequestMapping(value = "saveProject", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage saveProject(NodeProjectInfoModel projectInfo) {
+ public IJsonMessage saveProject(NodeProjectInfoModel projectInfo) {
// 预检查数据
String strPreviewData = getParameter("previewData");
boolean previewData = Convert.toBool(strPreviewData, false);
@@ -218,7 +219,7 @@ public class ManageEditProjectController extends BaseAgentController {
* @param previewData 是否是预检查
* @return 错误信息
*/
- private JsonMessage save(NodeProjectInfoModel projectInfo, NodeProjectInfoModel exits, boolean previewData) {
+ private IJsonMessage save(NodeProjectInfoModel projectInfo, NodeProjectInfoModel exits, boolean previewData) {
projectInfo.setWorkspaceId(getWorkspaceId());
this.checkPath(projectInfo);
@@ -356,7 +357,7 @@ public class ManageEditProjectController extends BaseAgentController {
* @return json
*/
@RequestMapping(value = "deleteProject", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage deleteProject(String copyId, String thorough) {
+ public IJsonMessage deleteProject(String copyId, String thorough) {
NodeProjectInfoModel nodeProjectInfoModel = tryGetProjectInfoModel();
if (nodeProjectInfoModel == null) {
// 返回正常 200 状态码,考虑节点分发重复操作
@@ -420,7 +421,7 @@ public class ManageEditProjectController extends BaseAgentController {
}
@RequestMapping(value = "releaseOutGiving", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
- public JsonMessage