mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 20:08:40 +08:00
fix 构建 SSH 发布命令支持 SSH_RELEASE_PATH 环境变量
This commit is contained in:
parent
686e402600
commit
ca6a6e5b1a
@ -1,6 +1,13 @@
|
|||||||
# 🚀 版本日志
|
# 🚀 版本日志
|
||||||
|
|
||||||
### 2.10.40.5-beta
|
### 2.10.40.6-beta
|
||||||
|
|
||||||
|
### 🐞 解决BUG、优化功能
|
||||||
|
|
||||||
|
1. 【server】优化 构建 SSH 发布命令支持 `SSH_RELEASE_PATH` 环境变量(感谢@定格)
|
||||||
|
------
|
||||||
|
|
||||||
|
### 2.10.40.5-beta (2023-04-12)
|
||||||
|
|
||||||
### 🐞 解决BUG、优化功能
|
### 🐞 解决BUG、优化功能
|
||||||
|
|
||||||
|
@ -394,6 +394,8 @@ public class ReleaseManage {
|
|||||||
session = sshService.getSessionByModel(machineSshModel);
|
session = sshService.getSessionByModel(machineSshModel);
|
||||||
Charset charset = machineSshModel.charset();
|
Charset charset = machineSshModel.charset();
|
||||||
int timeout = machineSshModel.timeout();
|
int timeout = machineSshModel.timeout();
|
||||||
|
String releasePath = this.buildExtraModule.getReleasePath();
|
||||||
|
envFileMap.put("SSH_RELEASE_PATH", releasePath);
|
||||||
// 执行发布前命令
|
// 执行发布前命令
|
||||||
if (StrUtil.isNotEmpty(this.buildExtraModule.getReleaseBeforeCommand())) {
|
if (StrUtil.isNotEmpty(this.buildExtraModule.getReleaseBeforeCommand())) {
|
||||||
//
|
//
|
||||||
@ -401,7 +403,6 @@ public class ReleaseManage {
|
|||||||
JschUtils.execCallbackLine(session, charset, timeout, this.buildExtraModule.getReleaseBeforeCommand(), StrUtil.EMPTY, envFileMap, logRecorder::info);
|
JschUtils.execCallbackLine(session, charset, timeout, this.buildExtraModule.getReleaseBeforeCommand(), StrUtil.EMPTY, envFileMap, logRecorder::info);
|
||||||
}
|
}
|
||||||
|
|
||||||
String releasePath = this.buildExtraModule.getReleasePath();
|
|
||||||
if (StrUtil.isEmpty(releasePath)) {
|
if (StrUtil.isEmpty(releasePath)) {
|
||||||
logRecorder.systemWarning("发布目录为空");
|
logRecorder.systemWarning("发布目录为空");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user