|
@@ -340,7 +340,7 @@ public class ProjectService {
|
|
|
* @param jobTemplateYamlPathTarget 执行文件
|
|
|
*/
|
|
|
@SneakyThrows
|
|
|
- public void transferAndRunYaml(String jobTemplateYamlPathSource, String projectId, String algorithmDockerImage, long completions, long parallelism, String jobTemplateYamlPathTarget) {
|
|
|
+ public void transferAndRunYaml(String jobTemplateYamlPathSource, String projectId, String projectType, String algorithmDockerImage, long completions, long parallelism, String jobTemplateYamlPathTarget) {
|
|
|
log.info("ProjectConsumer--transferYaml 项目 " + projectId + " 的完成度为:" + completions);
|
|
|
log.info("ProjectConsumer--transferYaml 项目 " + projectId + " 的并行度为:" + parallelism);
|
|
|
String yamlSource = FileUtil.read(jobTemplateYamlPathSource);
|
|
@@ -354,6 +354,13 @@ public class ProjectService {
|
|
|
String replace6 = replace5.replace("parallelism-number", parallelism + "");
|
|
|
String replace7 = replace6.replace("apiVers1on", "apiVersion");
|
|
|
String replace8 = replace7.replace("1atch/v1", "batch/v1");
|
|
|
+ String finalYaml;
|
|
|
+ if(DictConstants.PROJECT_TYPE_MANUAL.equals(projectType)){
|
|
|
+ finalYaml = replace8;
|
|
|
+ }else if (DictConstants.PROJECT_TYPE_AUTO_SUB.equals(projectType)){
|
|
|
+ //1 获取 git 仓库地址
|
|
|
+
|
|
|
+ }
|
|
|
log.info("ProjectConsumer--parseManualProject 开始执行 yaml 文件" + replace8);
|
|
|
FileUtil.writeStringToLocalFile(replace8, jobTemplateYamlPathTarget);
|
|
|
// 启动
|