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{
|
container := v1.Container{
|
||||||
Name: podName,
|
Name: podName,
|
||||||
Image: step.Image,
|
Image: step.Image,
|
||||||
WorkingDir: step.WorkingDir,
|
WorkingDir: step.WorkSpaceBase,
|
||||||
Ports: containerPorts(step.Ports),
|
Ports: containerPorts(step.Ports),
|
||||||
SecurityContext: containerSecurityContext(options.SecurityContext, step.Privileged),
|
SecurityContext: containerSecurityContext(options.SecurityContext, step.Privileged),
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ type Step struct {
|
||||||
Detached bool `json:"detach,omitempty"`
|
Detached bool `json:"detach,omitempty"`
|
||||||
Privileged bool `json:"privileged,omitempty"`
|
Privileged bool `json:"privileged,omitempty"`
|
||||||
WorkingDir string `json:"working_dir,omitempty"`
|
WorkingDir string `json:"working_dir,omitempty"`
|
||||||
|
WorkSpaceBase string `json:"workspace_base,omitempty"`
|
||||||
Environment map[string]string `json:"environment,omitempty"`
|
Environment map[string]string `json:"environment,omitempty"`
|
||||||
Entrypoint []string `json:"entrypoint,omitempty"`
|
Entrypoint []string `json:"entrypoint,omitempty"`
|
||||||
Commands []string `json:"commands,omitempty"`
|
Commands []string `json:"commands,omitempty"`
|
||||||
|
|
|
@ -179,6 +179,7 @@ func (c *Compiler) createProcess(container *yaml_types.Container, stepType backe
|
||||||
Detached: detached,
|
Detached: detached,
|
||||||
Privileged: privileged,
|
Privileged: privileged,
|
||||||
WorkingDir: workingDir,
|
WorkingDir: workingDir,
|
||||||
|
WorkSpaceBase: workspaceBase,
|
||||||
Environment: environment,
|
Environment: environment,
|
||||||
Commands: container.Commands,
|
Commands: container.Commands,
|
||||||
Entrypoint: container.Entrypoint,
|
Entrypoint: container.Entrypoint,
|
||||||
|
|
Loading…
Reference in a new issue