mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-30 02:48:17 +08:00
update ssh upload
This commit is contained in:
parent
e54f1b462c
commit
47cfce70d9
@ -315,6 +315,10 @@ Agent.sh create 创建Jpom插件端的应用服务(jpom-agent)
|
||||
|
||||
[名词解释](https://jpom.io/docs/index.html#/FQA/%E5%90%8D%E8%AF%8D%E8%A7%A3%E9%87%8A)
|
||||
|
||||
## 整体架构
|
||||
|
||||
![jpom-func-arch](https://cdn.jsdelivr.net/gh/jiangzeyin/Jpom-site/images/jpom-func-arch.jpg)
|
||||
|
||||
### 交流讨论 、提供bug反馈或建议
|
||||
|
||||
1. 微信群二维码(添加小助手:备注Jpom 进群)
|
||||
|
@ -251,25 +251,31 @@ public class ReleaseManage extends BaseBuild {
|
||||
}
|
||||
Session session = SshService.getSessionByModel(item);
|
||||
try {
|
||||
String releasePath = this.buildExtraModule.getReleasePath();
|
||||
if (StrUtil.isEmpty(releasePath)) {
|
||||
this.log("发布目录为空");
|
||||
} else {
|
||||
try (Sftp sftp = new Sftp(session, item.getCharsetT())) {
|
||||
if (this.buildExtraModule.isClearOld() && StrUtil.isNotEmpty(this.buildExtraModule.getReleasePath())) {
|
||||
String prefix = "";
|
||||
if (!StrUtil.startWith(releasePath, StrUtil.SLASH)) {
|
||||
prefix = sftp.pwd();
|
||||
}
|
||||
String normalizePath = FileUtil.normalize(prefix + StrUtil.SLASH + releasePath);
|
||||
if (this.buildExtraModule.isClearOld()) {
|
||||
try {
|
||||
sftp.delDir(this.buildExtraModule.getReleasePath());
|
||||
sftp.delDir(normalizePath);
|
||||
} catch (Exception e) {
|
||||
if (!StrUtil.startWithIgnoreCase(e.getMessage(), "No such file")) {
|
||||
this.pubLog("清除构建产物失败", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
String prefix = "";
|
||||
if (!StrUtil.startWith(this.buildExtraModule.getReleasePath(), StrUtil.SLASH)) {
|
||||
prefix = sftp.pwd();
|
||||
}
|
||||
String normalizePath = FileUtil.normalize(prefix + StrUtil.SLASH + this.buildExtraModule.getReleasePath());
|
||||
sftp.syncUpload(this.resultFile, normalizePath);
|
||||
this.log("ssh ftp upload done");
|
||||
} catch (Exception e) {
|
||||
this.pubLog("执行ssh发布异常", e);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
JschUtil.close(session);
|
||||
}
|
||||
|
@ -166,15 +166,15 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
<style scoped lang="stylus">
|
||||
.node-sider {
|
||||
/* height: calc(100vh - 75px); */
|
||||
min-height: calc(100vh);
|
||||
/* height: calc(100vh - 80px); */
|
||||
min-height: calc(100vh - 85px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
.layout-content {
|
||||
/* min-height: calc(100vh); */
|
||||
/* overflow-y: auto; */
|
||||
min-height: calc(100vh - 85px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
/* .node-layout {
|
||||
padding: 10px;
|
||||
|
Loading…
Reference in New Issue
Block a user