WorkSpaceBase -> WorkspaceBase

This commit is contained in:
pat-s 2024-10-21 19:08:06 +02:00
parent d394432652
commit 2c116d991c
No known key found for this signature in database
GPG key ID: 3C6318841EF78925
4 changed files with 11 additions and 11 deletions

View file

@ -183,7 +183,7 @@ func podContainer(step *types.Step, podName, goos string, options BackendOptions
container := v1.Container{
Name: podName,
Image: step.Image,
WorkingDir: step.WorkSpaceBase,
WorkingDir: step.WorkspaceBase,
Ports: containerPorts(step.Ports),
SecurityContext: containerSecurityContext(options.SecurityContext, step.Privileged),
}

View file

@ -24,7 +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"`
WorkspaceBase string `json:"workspace_base,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
Entrypoint []string `json:"entrypoint,omitempty"`
Commands []string `json:"commands,omitempty"`

View file

@ -97,7 +97,7 @@ func TestCompilerCompile(t *testing.T) {
Failure: "fail",
Volumes: []string{defaultVolumes[0].Name + ":/woodpecker"},
WorkingDir: "/woodpecker/src/github.com/octocat/hello-world",
WorkSpaceBase: "/woodpecker",
WorkspaceBase: "/woodpecker",
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"clone"}}},
ExtraHosts: []backend_types.HostAlias{},
}},
@ -144,7 +144,7 @@ func TestCompilerCompile(t *testing.T) {
Failure: "fail",
Volumes: []string{defaultVolumes[0].Name + ":/woodpecker"},
WorkingDir: "/woodpecker/src/github.com/octocat/hello-world",
WorkSpaceBase: "/woodpecker",
WorkspaceBase: "/woodpecker",
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"dummy"}}},
ExtraHosts: []backend_types.HostAlias{},
}},
@ -180,7 +180,7 @@ func TestCompilerCompile(t *testing.T) {
Failure: "fail",
Volumes: []string{defaultVolumes[0].Name + ":/test"},
WorkingDir: "/test/src/github.com/octocat/hello-world",
WorkSpaceBase: "/test",
WorkspaceBase: "/test",
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo env"}}},
ExtraHosts: []backend_types.HostAlias{},
}},
@ -194,7 +194,7 @@ func TestCompilerCompile(t *testing.T) {
Failure: "fail",
Volumes: []string{defaultVolumes[0].Name + ":/test"},
WorkingDir: "/test/src/github.com/octocat/hello-world",
WorkSpaceBase: "/test",
WorkspaceBase: "/test",
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"parallel echo 1"}}},
ExtraHosts: []backend_types.HostAlias{},
}},
@ -208,7 +208,7 @@ func TestCompilerCompile(t *testing.T) {
Failure: "fail",
Volumes: []string{defaultVolumes[0].Name + ":/test"},
WorkingDir: "/test/src/github.com/octocat/hello-world",
WorkSpaceBase: "/test",
WorkspaceBase: "/test",
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"parallel echo 2"}}},
ExtraHosts: []backend_types.HostAlias{},
}},
@ -245,7 +245,7 @@ func TestCompilerCompile(t *testing.T) {
Failure: "fail",
Volumes: []string{defaultVolumes[0].Name + ":/test"},
WorkingDir: "/test/src/github.com/octocat/hello-world",
WorkSpaceBase: "/test",
WorkspaceBase: "/test",
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo env"}}},
ExtraHosts: []backend_types.HostAlias{},
}, {
@ -257,7 +257,7 @@ func TestCompilerCompile(t *testing.T) {
Failure: "fail",
Volumes: []string{defaultVolumes[0].Name + ":/test"},
WorkingDir: "/test/src/github.com/octocat/hello-world",
WorkSpaceBase: "/test",
WorkspaceBase: "/test",
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo 2"}}},
ExtraHosts: []backend_types.HostAlias{},
}},
@ -271,7 +271,7 @@ func TestCompilerCompile(t *testing.T) {
Failure: "fail",
Volumes: []string{defaultVolumes[0].Name + ":/test"},
WorkingDir: "/test/src/github.com/octocat/hello-world",
WorkSpaceBase: "/test",
WorkspaceBase: "/test",
Networks: []backend_types.Conn{{Name: "test_default", Aliases: []string{"echo 1"}}},
ExtraHosts: []backend_types.HostAlias{},
}},

View file

@ -179,7 +179,7 @@ func (c *Compiler) createProcess(container *yaml_types.Container, stepType backe
Detached: detached,
Privileged: privileged,
WorkingDir: workingDir,
WorkSpaceBase: workspaceBase,
WorkspaceBase: workspaceBase,
Environment: environment,
Commands: container.Commands,
Entrypoint: container.Entrypoint,