Documentation ¶
Index ¶
- type Cacher
- type Compiler
- type ErrExtraHostFormat
- type ErrStepDependencyCycle
- type ErrStepMissingDependency
- type Option
- func WithCacher(cacher Cacher) Option
- func WithDefaultCloneImage(cloneImage string) Option
- func WithEnviron(env map[string]string) Option
- func WithEscalated(images ...string) Option
- func WithLocal(local bool) Option
- func WithMetadata(metadata metadata.Metadata) Option
- func WithNetrc(username, password, machine string) Option
- func WithNetrcOnlyTrusted(only bool) Option
- func WithNetworks(networks ...string) Option
- func WithOption(option Option, b bool) Option
- func WithPrefix(prefix string) Option
- func WithProxy(opt ProxyOptions) Option
- func WithRegistry(registries ...Registry) Option
- func WithResourceLimit(swap, mem, shmsize, cpuQuota, cpuShares int64, cpuSet string) Option
- func WithS3Cacher(access, secret, region, bucket string) Option
- func WithSecret(secrets ...Secret) Option
- func WithTrusted(trusted bool) Option
- func WithVolumeCacher(base string) Option
- func WithVolumes(volumes ...string) Option
- func WithWorkspace(base, path string) Option
- func WithWorkspaceFromURL(base, u string) Option
- type ProxyOptions
- type Registry
- type ResourceLimit
- type Secret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface { Restore(repo, branch string, mounts []string) *yaml_types.Container Rebuild(repo, branch string, mounts []string) *yaml_types.Container }
Cacher defines a compiler transform that can be used to implement default caching for a repository.
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler compiles the yaml
func (*Compiler) Compile ¶
func (c *Compiler) Compile(conf *yaml_types.Workflow) (*backend_types.Config, error)
Compile compiles the YAML configuration to the pipeline intermediate representation configuration format.
type ErrExtraHostFormat ¶
type ErrExtraHostFormat struct {
// contains filtered or unexported fields
}
func (*ErrExtraHostFormat) Error ¶
func (err *ErrExtraHostFormat) Error() string
func (*ErrExtraHostFormat) Is ¶
func (*ErrExtraHostFormat) Is(target error) bool
type ErrStepDependencyCycle ¶
type ErrStepDependencyCycle struct {
// contains filtered or unexported fields
}
func (*ErrStepDependencyCycle) Error ¶
func (err *ErrStepDependencyCycle) Error() string
func (*ErrStepDependencyCycle) Is ¶
func (*ErrStepDependencyCycle) Is(target error) bool
type ErrStepMissingDependency ¶
type ErrStepMissingDependency struct {
// contains filtered or unexported fields
}
func (*ErrStepMissingDependency) Error ¶
func (err *ErrStepMissingDependency) Error() string
func (*ErrStepMissingDependency) Is ¶
func (*ErrStepMissingDependency) Is(target error) bool
type Option ¶
type Option func(*Compiler)
Option configures a compiler option.
func WithCacher ¶
WithCacher configures the compiler with default cache settings.
func WithDefaultCloneImage ¶
func WithEnviron ¶
WithEnviron configures the compiler with environment variables added by default to every container in the pipeline.
func WithEscalated ¶
WithEscalated configures the compiler to automatically execute images as privileged containers if the match the given list.
func WithLocal ¶
WithLocal configures the compiler with the local flag. The local flag indicates the pipeline execution is running in a local development environment with a mounted local working directory.
func WithMetadata ¶
WithMetadata configures the compiler with the repository, pipeline and system metadata. The metadata is used to remove steps from the compiled pipeline configuration that should be skipped. The metadata is also added to each container as environment variables.
func WithNetrc ¶
WithNetrc configures the compiler with netrc authentication credentials added by default to every container in the pipeline.
func WithNetrcOnlyTrusted ¶
WithNetrcOnlyTrusted configures the compiler with the netrcOnlyTrusted repo option
func WithNetworks ¶
WithNetworks configures the compiler with additional networks to be connected to pipeline containers
func WithOption ¶
WithOption configures the compiler with the given option if boolean b evaluates to true.
func WithPrefix ¶
WithPrefix configures the compiler with the prefix. The prefix is used to prefix container, volume and network names to avoid collision at runtime.
func WithProxy ¶
func WithProxy(opt ProxyOptions) Option
WithProxy configures the compiler with HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables added by default to every container in the pipeline.
func WithRegistry ¶
WithRegistry configures the compiler with registry credentials that should be used to download images.
func WithResourceLimit ¶
WithResourceLimit configures the compiler with default resource limits that are applied each container in the pipeline.
func WithS3Cacher ¶
WithS3Cacher configures the compiler with default amazon s3 caching enabled.
func WithSecret ¶
WithSecret configures the compiler with external secrets to be injected into the container at runtime.
func WithTrusted ¶
WithTrusted configures the compiler with the trusted repo option
func WithVolumeCacher ¶
WithVolumeCacher configures the compiler with default local volume caching enabled.
func WithVolumes ¶
WithVolumes configures the compiler with default volumes that are mounted to each container in the pipeline.
func WithWorkspace ¶
WithWorkspace configures the compiler with the workspace base and path. The workspace base is a volume created at runtime and mounted into all containers in the pipeline. The base and path are joined to provide the working directory for all pipeline and plugin steps in the pipeline.
func WithWorkspaceFromURL ¶
WithWorkspaceFromURL configures the compiler with the workspace base and path based on the repository url.