ソースを参照

fix:对前端分支进行配置进行更新

xuxiaopang 2 年 前
コミット
28ca95bf7e

+ 2 - 1
web/src/main/java/cn/seecoder/web/core/pipeline/handler/NodeImageBuildHandler.java

@@ -70,7 +70,8 @@ public class NodeImageBuildHandler extends AbstractHandler{
             UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(repoUrl);
             repoUrl = builder.scheme("http").host(applicationProperties.getGitlab().getUrl().replace("http://","")).path(".git/").toUriString();
             Git git = gitApi.clone(repoUrl, directory.toString());
-            git.checkout().setName(branchName).call();
+            //git.checkout().setName(branchName).call();
+            git.checkout().setCreateBranch(false).setStartPoint("origin/" + branchName).setName("origin/" + branchName).call();
         } catch (Exception e) {
             context.appendErrorResult(PipelineException.GIT_CLONE_ERROR,e);
             throw new PipelineException(HttpStatus.SC_SERVICE_UNAVAILABLE, PipelineException.GIT_CLONE_ERROR,e);