Documentation ¶
Index ¶
- type Compiler
- type Metadata
- type Option
- func WithClone(clone bool) Option
- func WithEnviron(env map[string]string) Option
- func WithLimits(limits Resources) Option
- func WithMetadata(m Metadata) Option
- func WithNetrc(username, password, machine string) Option
- func WithNetworks(networks ...string) Option
- func WithPrivileged(images ...string) Option
- func WithRegistry(registries ...Registry) Option
- func WithSecret(secrets ...Secret) Option
- func WithTransform(t Transform) Option
- func WithVolumes(volumes ...string) Option
- func WithWorkspace(base, path string) Option
- func WithWorkspaceFromURL(base, link string) Option
- type Registry
- type Resources
- type Secret
- type Transform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
A Compiler compiles a pipeline configuration to an intermediate runtime.
type Metadata ¶
type Metadata struct { Ref string Repo string Platform string Environment string Event string Branch string Matrix map[string]string }
Metadata represents pipeline metadata required to filter pipeline steps.
type Option ¶
type Option func(*Compiler)
Option set a compiler option.
func WithEnviron ¶
WithEnviron configures the compiler with environment variables added by default to every container in the pipeline.
func WithLimits ¶
WithLimits configures the compiler with default resource limits that are applied each container in the pipeline.
func WithMetadata ¶
WithMetadata returns a compiler option to set metadata.
func WithNetrc ¶
WithNetrc configures the compiler with netrc authentication credentials added by default to every container in the pipeline.
func WithNetworks ¶
WithNetworks configures the compiler with additionnal networks to be connected to build containers
func WithPrivileged ¶
WithPrivileged configures the compiler to automatically execute images as privileged containers if the match the given list.
func WithRegistry ¶
WithRegistry configures the compiler with registry credentials that should be used to download images.
func WithSecret ¶
WithSecret configures the compiler with external secrets to be injected into the container at runtime.
func WithTransform ¶
WithTransform returns a compiler option to set transform t.
func WithVolumes ¶
WithVolumes configutes 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 build and plugin steps in the pipeline.
func WithWorkspaceFromURL ¶
WithWorkspaceFromURL configures the compiler with the workspace base and path based on the repository url.
type Registry ¶
Registry represents registry credentials used to pull private images from a docker registry.
type Resources ¶
type Resources struct { MemSwapLimit int64 MemLimit int64 ShmSize int64 CPUQuota int64 CPUSet string }
Resources represents the container resource limits.