From 0795436ebd482aca1c9f24d21353789fab00f8bb Mon Sep 17 00:00:00 2001 From: Egor Kovetskiy Date: Tue, 20 Oct 2020 19:00:04 +0300 Subject: [PATCH] sidecar/docker: fix container volume source for git --- internal/sidecar/cloud_sidecar.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/sidecar/cloud_sidecar.go b/internal/sidecar/cloud_sidecar.go index dd0c0ee..461876d 100644 --- a/internal/sidecar/cloud_sidecar.go +++ b/internal/sidecar/cloud_sidecar.go @@ -55,7 +55,7 @@ type CloudSidecar struct { func (sidecar *CloudSidecar) ContainerVolumes() []executor.Volume { return []executor.Volume{ - executor.Volume(sidecar.hostSubDir + "/" + consts.SUBDIR_GIT + ":" + sidecar.gitDir), + executor.Volume(sidecar.hostSubDir + "/" + consts.SUBDIR_GIT + "/" + sidecar.slug + ":" + sidecar.gitDir), executor.Volume(sidecar.hostSubDir + "/" + consts.SUBDIR_SSH + ":" + sidecar.sshDir), } } @@ -206,8 +206,8 @@ func (sidecar *CloudSidecar) Serve( // cloning git repository and switching commit commands := [][]string{ - {`git`, `clone`, "--recursive", opts.CloneURL, sidecar.gitDir}, - {`git`, `-C`, sidecar.gitDir, `checkout`, opts.Commit}, + {"git", "-C", sidecar.gitDir, "clone", "--recursive", opts.CloneURL, "."}, + {"git", "-C", sidecar.gitDir, "checkout", opts.Commit}, } for _, cmd := range commands {