Commit 5140f2e7 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Merge branch 'kubernetes-executor-clones-into-builds' into 'master'

Make Kubernetes executor to clone into /builds

See merge request !1282
parents ef40d5f9 11feb093
...@@ -26,7 +26,9 @@ import ( ...@@ -26,7 +26,9 @@ import (
var ( var (
executorOptions = executors.ExecutorOptions{ executorOptions = executors.ExecutorOptions{
SharedBuildsDir: false, DefaultBuildsDir: "/builds",
DefaultCacheDir: "/cache",
SharedBuildsDir: false,
Shell: common.ShellScriptInfo{ Shell: common.ShellScriptInfo{
Shell: "bash", Shell: "bash",
Type: common.NormalShell, Type: common.NormalShell,
...@@ -253,12 +255,9 @@ func (s *executor) getCommandsAndArgsV2(imageDefinition common.Image, command .. ...@@ -253,12 +255,9 @@ func (s *executor) getCommandsAndArgsV2(imageDefinition common.Image, command ..
} }
func (s *executor) getVolumeMounts() (mounts []api.VolumeMount) { func (s *executor) getVolumeMounts() (mounts []api.VolumeMount) {
path := strings.Split(s.Build.BuildDir, "/")
path = path[:len(path)-1]
mounts = append(mounts, api.VolumeMount{ mounts = append(mounts, api.VolumeMount{
Name: "repo", Name: "repo",
MountPath: strings.Join(path, "/"), MountPath: s.Build.RootDir,
}) })
for _, mount := range s.Config.Kubernetes.Volumes.HostPaths { for _, mount := range s.Config.Kubernetes.Volumes.HostPaths {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment