mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-10-23 02:23:53 +00:00
WorkSpaceBase -> WorkspaceBase
This commit is contained in:
parent
d394432652
commit
2c116d991c
4 changed files with 11 additions and 11 deletions
|
@ -183,7 +183,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.WorkSpaceBase,
|
WorkingDir: step.WorkspaceBase,
|
||||||
Ports: containerPorts(step.Ports),
|
Ports: containerPorts(step.Ports),
|
||||||
SecurityContext: containerSecurityContext(options.SecurityContext, step.Privileged),
|
SecurityContext: containerSecurityContext(options.SecurityContext, step.Privileged),
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +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"`
|
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"`
|
||||||
|
|
|
@ -97,7 +97,7 @@ func TestCompilerCompile(t *testing.T) {
|
||||||
Failure: "fail",
|
Failure: "fail",
|
||||||
Volumes: []string{defaultVolumes[0].Name + ":/woodpecker"},
|
Volumes: []string{defaultVolumes[0].Name + ":/woodpecker"},
|
||||||
WorkingDir: "/woodpecker/src/github.com/octocat/hello-world",
|
WorkingDir: "/woodpecker/src/github.com/octocat/hello-world",
|
||||||
WorkSpaceBase: "/woodpecker",
|
WorkspaceBase: "/woodpecker",
|
||||||
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"clone"}}},
|
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"clone"}}},
|
||||||
ExtraHosts: []backend_types.HostAlias{},
|
ExtraHosts: []backend_types.HostAlias{},
|
||||||
}},
|
}},
|
||||||
|
@ -144,7 +144,7 @@ func TestCompilerCompile(t *testing.T) {
|
||||||
Failure: "fail",
|
Failure: "fail",
|
||||||
Volumes: []string{defaultVolumes[0].Name + ":/woodpecker"},
|
Volumes: []string{defaultVolumes[0].Name + ":/woodpecker"},
|
||||||
WorkingDir: "/woodpecker/src/github.com/octocat/hello-world",
|
WorkingDir: "/woodpecker/src/github.com/octocat/hello-world",
|
||||||
WorkSpaceBase: "/woodpecker",
|
WorkspaceBase: "/woodpecker",
|
||||||
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"dummy"}}},
|
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"dummy"}}},
|
||||||
ExtraHosts: []backend_types.HostAlias{},
|
ExtraHosts: []backend_types.HostAlias{},
|
||||||
}},
|
}},
|
||||||
|
@ -180,7 +180,7 @@ func TestCompilerCompile(t *testing.T) {
|
||||||
Failure: "fail",
|
Failure: "fail",
|
||||||
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
||||||
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
||||||
WorkSpaceBase: "/test",
|
WorkspaceBase: "/test",
|
||||||
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo env"}}},
|
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo env"}}},
|
||||||
ExtraHosts: []backend_types.HostAlias{},
|
ExtraHosts: []backend_types.HostAlias{},
|
||||||
}},
|
}},
|
||||||
|
@ -194,7 +194,7 @@ func TestCompilerCompile(t *testing.T) {
|
||||||
Failure: "fail",
|
Failure: "fail",
|
||||||
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
||||||
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
||||||
WorkSpaceBase: "/test",
|
WorkspaceBase: "/test",
|
||||||
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"parallel echo 1"}}},
|
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"parallel echo 1"}}},
|
||||||
ExtraHosts: []backend_types.HostAlias{},
|
ExtraHosts: []backend_types.HostAlias{},
|
||||||
}},
|
}},
|
||||||
|
@ -208,7 +208,7 @@ func TestCompilerCompile(t *testing.T) {
|
||||||
Failure: "fail",
|
Failure: "fail",
|
||||||
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
||||||
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
||||||
WorkSpaceBase: "/test",
|
WorkspaceBase: "/test",
|
||||||
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"parallel echo 2"}}},
|
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"parallel echo 2"}}},
|
||||||
ExtraHosts: []backend_types.HostAlias{},
|
ExtraHosts: []backend_types.HostAlias{},
|
||||||
}},
|
}},
|
||||||
|
@ -245,7 +245,7 @@ func TestCompilerCompile(t *testing.T) {
|
||||||
Failure: "fail",
|
Failure: "fail",
|
||||||
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
||||||
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
||||||
WorkSpaceBase: "/test",
|
WorkspaceBase: "/test",
|
||||||
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo env"}}},
|
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo env"}}},
|
||||||
ExtraHosts: []backend_types.HostAlias{},
|
ExtraHosts: []backend_types.HostAlias{},
|
||||||
}, {
|
}, {
|
||||||
|
@ -257,7 +257,7 @@ func TestCompilerCompile(t *testing.T) {
|
||||||
Failure: "fail",
|
Failure: "fail",
|
||||||
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
||||||
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
||||||
WorkSpaceBase: "/test",
|
WorkspaceBase: "/test",
|
||||||
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo 2"}}},
|
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo 2"}}},
|
||||||
ExtraHosts: []backend_types.HostAlias{},
|
ExtraHosts: []backend_types.HostAlias{},
|
||||||
}},
|
}},
|
||||||
|
@ -271,7 +271,7 @@ func TestCompilerCompile(t *testing.T) {
|
||||||
Failure: "fail",
|
Failure: "fail",
|
||||||
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
Volumes: []string{defaultVolumes[0].Name + ":/test"},
|
||||||
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
WorkingDir: "/test/src/github.com/octocat/hello-world",
|
||||||
WorkSpaceBase: "/test",
|
WorkspaceBase: "/test",
|
||||||
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo 1"}}},
|
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo 1"}}},
|
||||||
ExtraHosts: []backend_types.HostAlias{},
|
ExtraHosts: []backend_types.HostAlias{},
|
||||||
}},
|
}},
|
||||||
|
|
|
@ -179,7 +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,
|
WorkspaceBase: workspaceBase,
|
||||||
Environment: environment,
|
Environment: environment,
|
||||||
Commands: container.Commands,
|
Commands: container.Commands,
|
||||||
Entrypoint: container.Entrypoint,
|
Entrypoint: container.Entrypoint,
|
||||||
|
|
Loading…
Reference in a new issue