Browse Source

优化dvc测试

dev-opt-homepage
chenzhihang 10 months ago
parent
commit
6d2a84aa93
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java

+ 3
- 2
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java View File

@@ -635,6 +635,7 @@ public class ModelsServiceImpl implements ModelsService {
File folder = new File(modelPath);
long folderSize = FileUtil.getFolderSize(folder);
modelMetaVo.setModelSize(FileUtil.formatFileSize(folderSize));
BeanUtils.copyProperties(modelMetaVo, modelsVo);

Map<String, Object> metaMap = JSON.parseObject(JSON.toJSONString(modelMetaVo), Map.class);
YamlUtils.generateYamlFile(metaMap, metaPath, "metadata");
@@ -717,8 +718,8 @@ public class ModelsServiceImpl implements ModelsService {
FileUtil.renameFile(rootPath, rootPath + "_deleted_" + System.currentTimeMillis());

//克隆
dvcUtils.gitClone(rootPath, projectUrl, oldModelDependencys.get(0).getVersion(), gitLinkUsername, gitLinkPassword);
dvcUtils.refreshRemoteBranches(rootPath, gitLinkUsername, gitLinkPassword, oldModelDependencys.get(0).getVersion());
dvcUtils.gitClone(rootPath, projectUrl, "origin", gitLinkUsername, gitLinkPassword);
dvcUtils.refreshRemoteBranches(rootPath, gitLinkUsername, gitLinkPassword, "origin");

//查询项目信息
String token = gitService.checkoutToken();


Loading…
Cancel
Save