mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-10-23 02:23:53 +00:00
add WorkSpaceBase to Step struct, set as default workingDir
This commit is contained in:
parent
102833b54e
commit
baa72e044f
3 changed files with 3 additions and 1 deletions
|
@ -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),
|
||||
}
|
||||
|
|
|
@ -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"`
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue