diff --git a/pipeline/backend/kubernetes/pod.go b/pipeline/backend/kubernetes/pod.go index 50ae55dcd..63f21e928 100644 --- a/pipeline/backend/kubernetes/pod.go +++ b/pipeline/backend/kubernetes/pod.go @@ -182,7 +182,7 @@ func podContainer(step *types.Step, podName, goos string, options BackendOptions container := v1.Container{ Name: podName, Image: step.Image, - WorkingDir: step.WorkingDir, + WorkingDir: step.WorkSpaceBase, Ports: containerPorts(step.Ports), SecurityContext: containerSecurityContext(options.SecurityContext, step.Privileged), } diff --git a/pipeline/backend/types/step.go b/pipeline/backend/types/step.go index 122cc6359..8a52824b0 100644 --- a/pipeline/backend/types/step.go +++ b/pipeline/backend/types/step.go @@ -24,6 +24,7 @@ type Step struct { Detached bool `json:"detach,omitempty"` Privileged bool `json:"privileged,omitempty"` WorkingDir string `json:"working_dir,omitempty"` + WorkSpaceBase string `json:"workspace_base,omitempty"` Environment map[string]string `json:"environment,omitempty"` Entrypoint []string `json:"entrypoint,omitempty"` Commands []string `json:"commands,omitempty"` diff --git a/pipeline/frontend/yaml/compiler/convert.go b/pipeline/frontend/yaml/compiler/convert.go index 792e35505..d9c6f23d0 100644 --- a/pipeline/frontend/yaml/compiler/convert.go +++ b/pipeline/frontend/yaml/compiler/convert.go @@ -179,6 +179,7 @@ func (c *Compiler) createProcess(container *yaml_types.Container, stepType backe Detached: detached, Privileged: privileged, WorkingDir: workingDir, + WorkSpaceBase: workspaceBase, Environment: environment, Commands: container.Commands, Entrypoint: container.Entrypoint,