| @@ -590,12 +590,6 @@ public class ModelsServiceImpl implements ModelsService { | |||||
| if (gitlinIid == null) { | if (gitlinIid == null) { | ||||
| throw new Exception("创建模型失败:" + project.get("message")); | throw new Exception("创建模型失败:" + project.get("message")); | ||||
| } | } | ||||
| // 创建分支 | |||||
| gitService.createBranch(token, (String) userInfo.get("login"), repositoryName, modelsVo.getVersion(), "master"); | |||||
| // 定义标签 标签1:ci4s-model 标签2:ModelTag 标签3:ModelType | |||||
| gitService.createTopic(token, gitlinIid, "ci4s-model"); | |||||
| gitService.createTopic(token, gitlinIid, "modeltag-" + modelsVo.getModelTag()); | |||||
| gitService.createTopic(token, gitlinIid, "modeltype-" + modelsVo.getModelType()); | |||||
| String branchName = modelsVo.getVersion(); | String branchName = modelsVo.getVersion(); | ||||
| String owner = (String) userInfo.get("login"); | String owner = (String) userInfo.get("login"); | ||||
| @@ -607,9 +601,14 @@ public class ModelsServiceImpl implements ModelsService { | |||||
| String metaPath = rootPath + "/metadata"; | String metaPath = rootPath + "/metadata"; | ||||
| String relatePath = ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName + "/" + branchName + "/model"; | String relatePath = ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName + "/" + branchName + "/model"; | ||||
| dvcUtils.gitClone(rootPath, projectUrl, "master", gitLinkUsername, gitLinkPassword); | |||||
| dvcUtils.createLocalBranchBasedOnMaster(rootPath, branchName); | |||||
| dvcUtils.gitCheckoutBranch(rootPath, branchName); | |||||
| // 创建分支 | |||||
| gitService.createBranch(token, (String) userInfo.get("login"), repositoryName, branchName, "master"); | |||||
| // 定义标签 标签1:ci4s-model 标签2:ModelTag 标签3:ModelType | |||||
| gitService.createTopic(token, gitlinIid, "ci4s-model"); | |||||
| gitService.createTopic(token, gitlinIid, "modeltag-" + modelsVo.getModelTag()); | |||||
| gitService.createTopic(token, gitlinIid, "modeltype-" + modelsVo.getModelType()); | |||||
| dvcUtils.gitClone(rootPath, projectUrl, branchName, gitLinkUsername, gitLinkPassword); | |||||
| //干掉目标文件夹 | //干掉目标文件夹 | ||||
| dvcUtils.deleteDirectory(modelPath); | dvcUtils.deleteDirectory(modelPath); | ||||