Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #11 from reconquest/fix-sidecar-volume
Browse files Browse the repository at this point in the history
sidecar/docker: fix container volume source for git
  • Loading branch information
seletskiy authored Oct 21, 2020
2 parents 3c77762 + 0795436 commit ad88297
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/sidecar/cloud_sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit ad88297

Please sign in to comment.