Documentation
¶
Index ¶
- func ParseEnvFile(e Container, srcPath string, env *map[string]string) common.Executor
- type Container
- type ExecutionsEnvironment
- type FileEntry
- type HostEnvironment
- func (e *HostEnvironment) BackendID() string
- func (e *HostEnvironment) Close() common.Executor
- func (e *HostEnvironment) Copy(destPath string, files ...*FileEntry) common.Executor
- func (e *HostEnvironment) CopyDir(destPath, srcPath string, useGitIgnore bool) common.Executor
- func (e *HostEnvironment) CopyTarStream(ctx context.Context, destPath string, tarStream io.Reader) error
- func (e *HostEnvironment) Create(_, _ []string) common.Executor
- func (e *HostEnvironment) DefaultPathVariable() string
- func (e *HostEnvironment) Exec(command []string, env map[string]string, user, workdir string) common.Executor
- func (e *HostEnvironment) ExecWithCmdLine(command []string, cmdline string, env map[string]string, user, workdir string) common.Executor
- func (e *HostEnvironment) GetActPath() string
- func (e *HostEnvironment) GetContainerArchive(ctx context.Context, srcPath string) (io.ReadCloser, error)
- func (e *HostEnvironment) GetName() string
- func (*HostEnvironment) GetPathVariableName() string
- func (e *HostEnvironment) GetRoot() string
- func (e *HostEnvironment) GetRunnerContext(_ context.Context) map[string]any
- func (*HostEnvironment) IsEnvironmentCaseInsensitive() bool
- func (e *HostEnvironment) IsHealthy(ctx context.Context) (time.Duration, error)
- func (*HostEnvironment) JoinPathVariable(paths ...string) string
- func (*HostEnvironment) ManagesOwnNetworking() bool
- func (e *HostEnvironment) Pull(_ bool) common.Executor
- func (e *HostEnvironment) Remove() common.Executor
- func (e *HostEnvironment) ReplaceLogWriter(stdout, _ io.Writer) (io.Writer, io.Writer)
- func (e *HostEnvironment) Start(_ bool) common.Executor
- func (*HostEnvironment) SupportsDockerContainerActions() bool
- func (e *HostEnvironment) ToContainerPath(path string) string
- func (e *HostEnvironment) UpdateFromEnv(srcPath string, env *map[string]string) common.Executor
- func (e *HostEnvironment) UpdateFromImageEnv(_ *map[string]string) common.Executor
- type NewContainerInput
- type PortBinding
- type PortSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Container ¶
type Container interface {
Create(capAdd, capDrop []string) common.Executor
Copy(destPath string, files ...*FileEntry) common.Executor
CopyTarStream(ctx context.Context, destPath string, tarStream io.Reader) error
CopyDir(destPath, srcPath string, useGitIgnore bool) common.Executor
GetContainerArchive(ctx context.Context, srcPath string) (io.ReadCloser, error)
Pull(forcePull bool) common.Executor
Start(attach bool) common.Executor
Exec(command []string, env map[string]string, user, workdir string) common.Executor
UpdateFromEnv(srcPath string, env *map[string]string) common.Executor
UpdateFromImageEnv(env *map[string]string) common.Executor
Remove() common.Executor
Close() common.Executor
ReplaceLogWriter(io.Writer, io.Writer) (io.Writer, io.Writer)
IsHealthy(ctx context.Context) (time.Duration, error)
}
Container for managing docker run containers
type ExecutionsEnvironment ¶
type ExecutionsEnvironment interface {
Container
ToContainerPath(string) string
GetName() string
GetRoot() string
// BackendID returns a stable, unique identifier for the back-end.
// Format: lowercase ASCII, alphanumeric plus dashes/underscores (slug form).
// Used in error messages, log fields, and (for plugins) matching against
// runs-on labels. Must be unique across registered back-ends. Renames are
// breaking.
BackendID() string
// SupportsDockerContainerActions reports whether the back-end can run a
// step that requires a Docker container action: `uses: docker://image` or
// an action whose `runs.using: docker`. It does not gate job-level
// `container:`, `services:`, or JS/composite actions.
SupportsDockerContainerActions() bool
// ManagesOwnNetworking reports whether the back-end provides its own
// networking, in which case the runner skips creating the shared Docker
// network used for services and aliases.
ManagesOwnNetworking() bool
GetActPath() string
GetPathVariableName() string
DefaultPathVariable() string
JoinPathVariable(...string) string
GetRunnerContext(ctx context.Context) map[string]any
// On windows PATH and Path are the same key
IsEnvironmentCaseInsensitive() bool
}
type HostEnvironment ¶
type HostEnvironment struct {
Name string
Path string
TmpDir string
ToolCache string
Workdir string
ActPath string
Root string
StdOut io.Writer
LXC bool
}
func (*HostEnvironment) BackendID ¶ added in v12.10.2
func (e *HostEnvironment) BackendID() string
func (*HostEnvironment) Close ¶
func (e *HostEnvironment) Close() common.Executor
func (*HostEnvironment) Copy ¶
func (e *HostEnvironment) Copy(destPath string, files ...*FileEntry) common.Executor
func (*HostEnvironment) CopyDir ¶
func (e *HostEnvironment) CopyDir(destPath, srcPath string, useGitIgnore bool) common.Executor
func (*HostEnvironment) CopyTarStream ¶
func (*HostEnvironment) DefaultPathVariable ¶
func (e *HostEnvironment) DefaultPathVariable() string
func (*HostEnvironment) ExecWithCmdLine ¶
func (*HostEnvironment) GetActPath ¶
func (e *HostEnvironment) GetActPath() string
func (*HostEnvironment) GetContainerArchive ¶
func (e *HostEnvironment) GetContainerArchive(ctx context.Context, srcPath string) (io.ReadCloser, error)
func (*HostEnvironment) GetName ¶
func (e *HostEnvironment) GetName() string
func (*HostEnvironment) GetPathVariableName ¶
func (*HostEnvironment) GetPathVariableName() string
func (*HostEnvironment) GetRoot ¶
func (e *HostEnvironment) GetRoot() string
func (*HostEnvironment) GetRunnerContext ¶
func (e *HostEnvironment) GetRunnerContext(_ context.Context) map[string]any
func (*HostEnvironment) IsEnvironmentCaseInsensitive ¶
func (*HostEnvironment) IsEnvironmentCaseInsensitive() bool
func (*HostEnvironment) JoinPathVariable ¶
func (*HostEnvironment) JoinPathVariable(paths ...string) string
func (*HostEnvironment) ManagesOwnNetworking ¶ added in v12.10.2
func (*HostEnvironment) ManagesOwnNetworking() bool
func (*HostEnvironment) Remove ¶
func (e *HostEnvironment) Remove() common.Executor
func (*HostEnvironment) ReplaceLogWriter ¶
func (*HostEnvironment) SupportsDockerContainerActions ¶ added in v12.10.2
func (*HostEnvironment) SupportsDockerContainerActions() bool
func (*HostEnvironment) ToContainerPath ¶
func (e *HostEnvironment) ToContainerPath(path string) string
func (*HostEnvironment) UpdateFromEnv ¶
func (*HostEnvironment) UpdateFromImageEnv ¶
func (e *HostEnvironment) UpdateFromImageEnv(_ *map[string]string) common.Executor
type NewContainerInput ¶
type NewContainerInput struct {
Image string
Username string
Password string
Entrypoint []string
Cmd []string
Init bool
TTY bool
WorkingDir string
Env []string
ToolCache string
Binds []string
Mounts map[string]string
Name string
Stdout io.Writer
Stderr io.Writer
NetworkMode string
Privileged bool
UsernsMode string
DefaultPlatform string // platform if not overridden in JobOptions
NetworkAliases []string
ExposedPorts map[PortSpec]struct{}
PortBindings map[PortSpec][]PortBinding
ConfigOptions string
JobOptions string
ValidVolumes []string
}
NewContainerInput the input for the New function
type PortBinding ¶ added in v12.10.2
PortBinding represents a binding between a container port and a host address.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.