|
|
@@ -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);
|