|
@@ -4,6 +4,7 @@ import api.common.pojo.constants.DictConstants;
|
|
|
import api.common.pojo.dto.ProjectMessageDTO;
|
|
|
import api.common.util.*;
|
|
|
import com.css.simulation.resource.scheduler.configuration.docker.DockerConfiguration;
|
|
|
+import com.css.simulation.resource.scheduler.configuration.git.GitConfiguration;
|
|
|
import com.css.simulation.resource.scheduler.configuration.kubernetes.KubernetesConfiguration;
|
|
|
import com.css.simulation.resource.scheduler.mapper.*;
|
|
|
import com.css.simulation.resource.scheduler.pojo.po.*;
|
|
@@ -95,6 +96,8 @@ public class ProjectService {
|
|
|
DockerConfiguration dockerConfiguration;
|
|
|
@Resource
|
|
|
KubernetesConfiguration kubernetesConfiguration;
|
|
|
+ @Resource
|
|
|
+ GitConfiguration gitConfiguration;
|
|
|
|
|
|
|
|
|
// -------------------------------- Comment --------------------------------
|
|
@@ -352,7 +355,7 @@ public class ProjectService {
|
|
|
MinioUtil.downloadToFile(minioClient, bucketName, minioPath, algorithmTarLinuxTempPath); // 下载算法文件到本地
|
|
|
} else if (DictConstants.ALGORITHM_UPLOAD_MODE_GIT.equals(uploadMode)) {
|
|
|
algorithmDirectoryLinuxTempPath = linuxTempPath + "algorithm-git/" + algorithmCode + "/";
|
|
|
- String gitUrl = algorithmPO.getGitUrl();
|
|
|
+ String gitUrl = algorithmPO.getGitUrl().replace(gitConfiguration.getName(), gitConfiguration.getUrl());
|
|
|
String gitUserName = algorithmPO.getGitUserName();
|
|
|
String gitPassword = algorithmPO.getGitPassword();
|
|
|
GitUtil.clone(gitUrl, gitUserName, gitPassword, algorithmDirectoryLinuxTempPath); // 下载算法文件到目录
|