|
|
|
@@ -565,6 +565,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
String gitLinkUsername = loginUser.getSysUser().getGitLinkUsername(); |
|
|
|
String gitLinkPassword = loginUser.getSysUser().getGitLinkPassword(); |
|
|
|
Map<String, Object> userInfo = getUserInfo(ci4sUsername, gitLinkUsername, gitLinkPassword); |
|
|
|
String decryptGitLinkPassword = decrypt(gitLinkPassword); |
|
|
|
Integer userId = (Integer) userInfo.get("user_id"); |
|
|
|
|
|
|
|
ci4sUsername = Boolean.TRUE.equals(modelsVo.getIsPublic()) ? Constant.Item_Public : ci4sUsername; |
|
|
|
@@ -613,7 +614,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
gitService.createTopic(token, gitlinIid, "modeltype-" + modelsVo.getModelType()); |
|
|
|
} |
|
|
|
|
|
|
|
dvcUtils.gitClone(rootPath, projectUrl, branchName, gitLinkUsername, gitLinkPassword); |
|
|
|
dvcUtils.gitClone(rootPath, projectUrl, branchName, gitLinkUsername, decryptGitLinkPassword); |
|
|
|
|
|
|
|
//干掉目标文件夹 |
|
|
|
dvcUtils.deleteDirectory(modelPath); |
|
|
|
@@ -668,7 +669,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
dvcUtils.dvcAdd(rootPath, "model"); |
|
|
|
// git commit |
|
|
|
dvcUtils.gitCommit(rootPath, "commit from ci4s with " + loginUser.getUsername()); |
|
|
|
dvcUtils.gitPush(rootPath, gitLinkUsername, gitLinkPassword); |
|
|
|
dvcUtils.gitPush(rootPath, gitLinkUsername, decryptGitLinkPassword); |
|
|
|
dvcUtils.dvcPush(rootPath); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error(e.getMessage(), e); |
|
|
|
@@ -691,6 +692,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
String gitLinkUsername = loginUser.getSysUser().getGitLinkUsername(); |
|
|
|
String gitLinkPassword = loginUser.getSysUser().getGitLinkPassword(); |
|
|
|
Map<String, Object> userInfo = getUserInfo(ci4sUsername, gitLinkUsername, gitLinkPassword); |
|
|
|
gitLinkPassword = decrypt(gitLinkPassword); |
|
|
|
|
|
|
|
ci4sUsername = Boolean.TRUE.equals(modelsVo.getIsPublic()) ? Constant.Item_Public : loginUser.getUsername(); |
|
|
|
String repositoryName = modelsVo.getIdentifier() == null ? ci4sUsername + "_model_" + DateUtils.dateTimeNow() : modelsVo.getIdentifier(); |
|
|
|
|