|
|
|
@@ -144,7 +144,7 @@ public class NewDatasetServiceImpl implements NewDatasetService { |
|
|
|
// 得到项目地址 |
|
|
|
String projectUrl = gitCloneEndpoint + "/" + owner + "/" + repositoryName + ".git"; |
|
|
|
|
|
|
|
// 创建master空分支 |
|
|
|
// 创建master分支 |
|
|
|
dvcUtils.gitClone(localPath, projectUrl, "master", gitLinkUsername, gitLinkPassword); |
|
|
|
// 拼接生产的元数据后写入yaml文件 |
|
|
|
datasetVo.setCreateBy(String.valueOf(StringUtils.isNotEmpty((String) userInfo.get("nickname")) ? userInfo.get("nickname") : userInfo.get("login"))); |
|
|
|
@@ -174,7 +174,7 @@ public class NewDatasetServiceImpl implements NewDatasetService { |
|
|
|
|
|
|
|
// 创建分支 |
|
|
|
String branchName = datasetVo.getVersion(); |
|
|
|
gitService.createBranch(token, owner, repositoryName, branchName, "master"); |
|
|
|
// gitService.createBranch(token, owner, repositoryName, branchName, "master"); |
|
|
|
|
|
|
|
// 得到用户操作的路径 |
|
|
|
String sourcePath = datasetVo.getDatasetVersionVos().get(0).getUrl(); |
|
|
|
@@ -183,7 +183,9 @@ public class NewDatasetServiceImpl implements NewDatasetService { |
|
|
|
String datasetPath1 = localPath1 + "/dataset"; |
|
|
|
|
|
|
|
// 命令行操作 git clone 项目地址 |
|
|
|
dvcUtils.gitClone(localPath1, projectUrl, branchName, gitLinkUsername, gitLinkPassword); |
|
|
|
dvcUtils.gitClone(localPath1, projectUrl, "master", gitLinkUsername, gitLinkPassword); |
|
|
|
dvcUtils.refreshRemoteBranches(localPath1, gitLinkUsername, gitLinkPassword, "master"); |
|
|
|
|
|
|
|
String s3Path1 = bucketName + "/mini-model-management-platform-files" + "/" + relatePath1; |
|
|
|
//删掉已存在文件夹 |
|
|
|
dvcUtils.deleteDirectory(datasetPath1); |
|
|
|
@@ -201,7 +203,6 @@ public class NewDatasetServiceImpl implements NewDatasetService { |
|
|
|
|
|
|
|
CompletableFuture.supplyAsync(() -> { |
|
|
|
try { |
|
|
|
dvcUtils.dvcInit(localPath1); |
|
|
|
// 配置远程S3地址 |
|
|
|
dvcUtils.dvcRemoteAdd(localPath1, s3Path1); |
|
|
|
dvcUtils.dvcConfigS3Credentials(localPath1, endpoint); |
|
|
|
|