Browse Source

优化clone

dev-active_learn
chenzhihang 10 months ago
parent
commit
08b142f8fe
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java

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

@@ -105,6 +105,8 @@ public class ModelsServiceImpl implements ModelsService {
private Integer redisPort;
@Value("${git.endpoint}")
String gitendpoint;
@Value("${git.cloneEndpoint}")
String gitCloneEndpoint;
@Value("${git.localPath}")
String localPath;
@Value("${minio.accessKey}")
@@ -593,7 +595,7 @@ public class ModelsServiceImpl implements ModelsService {
String branchName = modelsVo.getVersion();
String owner = (String) userInfo.get("login");

String projectUrl = gitendpoint + "/" + owner + "/" + repositoryName + ".git";
String projectUrl = gitCloneEndpoint + "/" + owner + "/" + repositoryName + ".git";
String sourcePath = modelsVo.getModelVersionVos().get(0).getUrl();
String rootPath = localPath + ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName + "/" + branchName;
String modelPath = rootPath + "/model";
@@ -702,7 +704,7 @@ public class ModelsServiceImpl implements ModelsService {
String branchName = modelsVo.getVersion();
String owner = (String) userInfo.get("login");

String projectUrl = gitendpoint + "/" + owner + "/" + repositoryName + ".git";
String projectUrl = gitCloneEndpoint + "/" + owner + "/" + repositoryName + ".git";
String rootPath = localPath + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName;
String modelPath = rootPath + "/model";
String metaPath = rootPath + "/metadata";


Loading…
Cancel
Save